Skip to content

AttributeError: 'NoneType' object has no attribute 'split' when initializing TweeterPy #110

@icematerial

Description

@icematerial

Since yesterday, I’ve been encountering the following error when calling twitter = TweeterPy()

2026-03-20 13:47:15,876 [ERROR] :: Couldn't generate a new session.
'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "C:\Users<username>\anaconda3\Lib\site-packages\tweeterpy\tweeterpy.py", line 194, in generate_session
ondemand_file_response = util.get_ondemand_file_response(
File "C:\Users<username>\anaconda3\Lib\site-packages\tweeterpy\util.py", line 100, in get_ondemand_file_response
ondemand_file = session.request(url=ondemand_file_url, method="GET")
File "C:\Users<username>\anaconda3\Lib\site-packages\curl_cffi\requests\session.py", line 543, in request
req, buffer, header_buffer, q, header_recved, quit_now = set_curl_options(
File "C:\Users<username>\anaconda3\Lib\site-packages\curl_cffi\requests\utils.py", line 393, in set_curl_options
url = requote_uri(url)
File "C:\Users<username>\anaconda3\Lib\site-packages\curl_cffi\requests\utils.py", line 190, in requote_uri
return quote(unquote_unreserved(uri), safe=safe_with_percent)
File "C:\Users<username>\anaconda3\Lib\site-packages\curl_cffi\requests\utils.py", line 160, in unquote_unreserved
parts = uri.split("%")
AttributeError: 'NoneType' object has no attribute 'split'

I have already tried updating the library to the latest version, but the issue persists. Could this be due to a recent change in X (Twitter)'s specifications?

Any help or insights would be greatly appreciated. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions