-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Timeout value connect was <object object at 0x1034647c0>, but it must be an int, float or None #19
Comments
I had the same issue, if you are not using urllib3 for any other modules, try downgrading it: pip uninstall urllib3 pip install urllib3==1.26.5 |
Hi pradt, thanks for filing this issue! The TL;DR -
ExplanationI think petejvig's suggestion is a solid approach. Looking through the error you ran into:
it looks like this error is occurring because of some changes to the
To test this, I ran the following snippet of code you included:
and this worked for me - so I'm pretty sure pinning
If you use
This might look something like:
Related issues
Let me know if this addresses your issue, or if you have any questions about my explanation and would like me to explain something more! |
- avoids problem described in issue #19
- avoids problem described in issue #19
Hi,
I'm facing the following error while executing the sample :
lc.create_list_for(url='https://www.youtube.com/user/schafer5') File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/yt_videos_list/__init__.py", line 323, in create_list_for video_data, write_information = logic.execute(deque([url]), file_name, log_silently, *instance_attributes, _DummyLock()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/yt_videos_list/logic.py", line 198, in execute driver = open_user_driver() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/yt_videos_list/logic.py", line 55, in open_user_driver return supported_drivers[user_driver]() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/yt_videos_list/logic.py", line 60, in configure_firefoxdriver return webdriver.Firefox(options=options) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__ RemoteWebDriver.__init__( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute response = self.command_executor.execute(driver_command, params) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute return self._request(command_info[0], url, body=data) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 397, in _request resp = self._conn.request(method, url, body=body, headers=headers) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/_request_methods.py", line 118, in request return self.request_encode_body( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/_request_methods.py", line 217, in request_encode_body return self.urlopen(method, url, **extra_kw) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/poolmanager.py", line 422, in urlopen conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/poolmanager.py", line 303, in connection_from_host return self.connection_from_context(request_context) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/poolmanager.py", line 328, in connection_from_context return self.connection_from_pool_key(pool_key, request_context=request_context) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/poolmanager.py", line 351, in connection_from_pool_key pool = self._new_pool(scheme, host, port, request_context=request_context) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/poolmanager.py", line 265, in _new_pool return pool_cls(host, port, **request_context) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/connectionpool.py", line 196, in __init__ timeout = Timeout.from_float(timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/util/timeout.py", line 190, in from_float return Timeout(read=timeout, connect=timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/util/timeout.py", line 119, in __init__ self._connect = self._validate_timeout(connect, "connect") File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/urllib3/util/timeout.py", line 156, in _validate_timeout raise ValueError( ValueError: Timeout value connect was <object object at 0x1034647c0>, but it must be an int, float or None.
sample file was :
`from yt_videos_list import ListCreator
my_driver = 'firefox' # SUBSTITUTE DRIVER YOU WANT (options below)
lc = ListCreator(driver=my_driver, scroll_pause_time=0.8)
lc.create_list_for(url='https://www.youtube.com/user/schafer5')`
and I ran it as python3 sample.py. I'm not sure if I'm missing something here ?
my python version is 3.10.11
The text was updated successfully, but these errors were encountered: