ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.62k stars 1.15k forks source link

python 3.10 error: the *loop* parameter was removed from Lock() since it is no longer necessary**** #391

Open huyangnl opened 2 years ago

huyangnl commented 2 years ago

driver.get('https://www.zoom.us/signin') File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\undetected_chromedriver\v2.py", line 546, in get return asyncio.get_event_loop().run_until_complete(_get()) File "C:\Users\achil\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\undetected_chromedriver\v2.py", line 541, in _get async with websockets.connect(wsurl) as ws: File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\websockets\legacy\client.py", line 604, in aenter return await self File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\websockets\legacy\client.py", line 622, in __await_impl transport, protocol = await self._create_connection() File "C:\Users\achil\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1080, in create_connection transport, protocol = await self._create_connection_transport( File "C:\Users\achil\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1098, in _create_connection_transport protocol = protocol_factory() File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\websockets\legacy\client.py", line 160, in init super().init(**kwargs) File "D:\BaiduNetdiskWorkspace\PycharmProjects\venv\lib\site-packages\websockets\legacy\protocol.py", line 154, in init self._drain_lock = asyncio.Lock( File "C:\Users\achil\AppData\Local\Programs\Python\Python310\lib\asyncio\locks.py", line 77, in init super().init(loop=loop) File "C:\Users\achil\AppData\Local\Programs\Python\Python310\lib\asyncio\mixins.py", line 17, in init__ raise TypeError( TypeError: As of 3.10, the loop parameter was removed from Lock() since it is no longer necessary

====================

If change to python 3.9 is all right.

huyangnl commented 2 years ago

Upgrade package websockets from 9.1 to 10.1.

Solved.