You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import undetected_chromedriver as uc
driver = uc.Chrome(headless=True,use_subprocess=False)
driver.get('https://nowsecure.nl')
driver.save_screenshot('nowsecure.png')
It always displays error WinError 10054.
C:\ProgramData\anaconda3\envs\python311\python.exe C:\Users\Administrator\Personal_scripts\pythonProject\temp.py
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 1303, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 1349, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 1298, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 1058, in _send_output
self.send(msg)
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 996, in send
self.connect()
File "C:\ProgramData\anaconda3\envs\python311\Lib\http\client.py", line 1475, in connect
self.sock = self._context.wrap_socket(self.sock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\ssl.py", line 1104, in _create
self.do_handshake()
File "C:\ProgramData\anaconda3\envs\python311\Lib\ssl.py", line 1382, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\Personal_scripts\pythonProject\temp.py", line 3, in<module>
driver = uc.Chrome(headless=True,use_subprocess=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\undetected_chromedriver-3.5.5-py3.11.egg\undetected_chromedriver\__init__.py", line 258, in __init__
self.patcher.auto()
File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\undetected_chromedriver-3.5.5-py3.11.egg\undetected_chromedriver\patcher.py", line 178, in auto
self.unzip_package(self.fetch_package())
^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\site-packages\undetected_chromedriver-3.5.5-py3.11.egg\undetected_chromedriver\patcher.py", line 287, in fetch_package
return urlretrieve(download_url)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 241, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\python311\Lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10054] 远程主机强迫关闭了一个现有的连接。>
Even if I try to change the website address or use driver.options.add_argument('--proxy-server=http://127.0.0.1:14937'), I still receive a WinError 10054. Is it related to my use of VPN clash?
The text was updated successfully, but these errors were encountered:
I used command:
and used you give code:
It always displays error WinError 10054.
Even if I try to change the website address or use
driver.options.add_argument('--proxy-server=http://127.0.0.1:14937')
, I still receive a WinError 10054. Is it related to my use of VPN clash?The text was updated successfully, but these errors were encountered: