Skip to content
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

远程连接关闭啥意思 #37

Closed
cnzh10000 opened this issue Oct 7, 2023 · 5 comments
Closed

远程连接关闭啥意思 #37

cnzh10000 opened this issue Oct 7, 2023 · 5 comments

Comments

@cnzh10000
Copy link

2023-10-07 09:48:35.269954 开始解析配置文件
2023-10-07 09:48:35.270951 结束解析配置文件
2023-10-07 09:48:35.281922 开始设置浏览器参数
Traceback (most recent call last):
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request
raise new_e
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn
conn.connect()
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl
.py", line 469, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl
.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create
self.do_handshake()
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, 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\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\util.py", line 38, in reraise
raise value.with_traceback(tb)
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request
raise new_e
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn
conn.connect()
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl
.py", line 469, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl
.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create
self.do_handshake()
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 32, in get
resp = requests.get(
^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\hw_seckill-master\main.py", line 24, in
main()
File "E:\hw_seckill-master\main.py", line 8, in main
huawei = HuaWei("config.ini")
^^^^^^^^^^^^^^^^^^^^
File "E:\hw_seckill-master\huawei.py", line 31, in init
self.__browser_setting()
File "E:\hw_seckill-master\huawei.py", line 128, in __browser_setting
browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\chrome.py", line 40, in install
driver_path = self._get_driver_binary_path(self.driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\manager.py", line 35, in _get_driver_binary_path
binary_path = self._cache_manager.find_driver(driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 105, in find_driver
driver_version = self.get_cache_key_driver_version(driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 151, in get_cache_key_driver_version
return driver.get_driver_version_to_download()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver.py", line 48, in get_driver_version_to_download
return self.get_latest_release_version()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\drivers\chrome.py", line 64, in get_latest_release_version
resp = self._http_client.get(url=latest_release_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 35, in get
raise exceptions.ConnectionError(f"Could not reach host. Are you offline?")
requests.exceptions.ConnectionError: Could not reach host. Are you offline?

@ancoka
Copy link
Owner

ancoka commented Oct 7, 2023

2023-10-07 09:48:35.269954 开始解析配置文件 2023-10-07 09:48:35.270951 结束解析配置文件 2023-10-07 09:48:35.281922 开始设置浏览器参数 Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, 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\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\util.py", line 38, in reraise raise value.with_traceback(tb) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 32, in get resp = requests.get( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\hw_seckill-master\main.py", line 24, in main() File "E:\hw_seckill-master\main.py", line 8, in main huawei = HuaWei("config.ini") ^^^^^^^^^^^^^^^^^^^^ File "E:\hw_seckill-master\huawei.py", line 31, in init self.__browser_setting() File "E:\hw_seckill-master\huawei.py", line 128, in __browser_setting browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\chrome.py", line 40, in install driver_path = self._get_driver_binary_path(self.driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\manager.py", line 35, in _get_driver_binary_path binary_path = self._cache_manager.find_driver(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 105, in find_driver driver_version = self.get_cache_key_driver_version(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 151, in get_cache_key_driver_version return driver.get_driver_version_to_download() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver.py", line 48, in get_driver_version_to_download return self.get_latest_release_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\drivers\chrome.py", line 64, in get_latest_release_version resp = self._http_client.get(url=latest_release_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 35, in get raise exceptions.ConnectionError(f"Could not reach host. Are you offline?") requests.exceptions.ConnectionError: Could not reach host. Are you offline?

麻烦问下,你这个重新执行还是一样的问题吗

@cnzh10000
Copy link
Author

2023-10-07 09:48:35.269954 开始解析配置文件 2023-10-07 09:48:35.270951 结束解析配置文件 2023-10-07 09:48:35.281922 开始设置浏览器参数 Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, 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\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\util.py", line 38, in reraise raise value.with_traceback(tb) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 32, in get resp = requests.get( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\hw_seckill-master\main.py", line 24, in main() File "E:\hw_seckill-master\main.py", line 8, in main huawei = HuaWei("config.ini") ^^^^^^^^^^^^^^^^^^^^ File "E:\hw_seckill-master\huawei.py", line 31, in init self.__browser_setting() File "E:\hw_seckill-master\huawei.py", line 128, in __browser_setting browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\chrome.py", line 40, in install driver_path = self._get_driver_binary_path(self.driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\manager.py", line 35, in _get_driver_binary_path binary_path = self._cache_manager.find_driver(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 105, in find_driver driver_version = self.get_cache_key_driver_version(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 151, in get_cache_key_driver_version return driver.get_driver_version_to_download() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver.py", line 48, in get_driver_version_to_download return self.get_latest_release_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\drivers\chrome.py", line 64, in get_latest_release_version resp = self._http_client.get(url=latest_release_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 35, in get raise exceptions.ConnectionError(f"Could not reach host. Are you offline?") requests.exceptions.ConnectionError: Could not reach host. Are you offline?

麻烦问下,你这个重新执行还是一样的问题吗

是的,从新执行了好几次 都是这样

@ancoka
Copy link
Owner

ancoka commented Oct 7, 2023

2023-10-07 09:48:35.269954 开始解析配置文件 2023-10-07 09:48:35.270951 结束解析配置文件 2023-10-07 09:48:35.281922 开始设置浏览器参数 Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, 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\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\util.py", line 38, in reraise raise value.with_traceback(tb) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 1092, in _validate_conn conn.connect() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connection.py", line 783, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 469, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\util\ssl.py", line 513, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1046, in _create self.do_handshake() File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 1317, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 32, in get resp = requests.get( ^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "E:\hw_seckill-master\main.py", line 24, in main() File "E:\hw_seckill-master\main.py", line 8, in main huawei = HuaWei("config.ini") ^^^^^^^^^^^^^^^^^^^^ File "E:\hw_seckill-master\huawei.py", line 31, in init self.__browser_setting() File "E:\hw_seckill-master\huawei.py", line 128, in __browser_setting browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\chrome.py", line 40, in install driver_path = self._get_driver_binary_path(self.driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\manager.py", line 35, in _get_driver_binary_path binary_path = self._cache_manager.find_driver(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 105, in find_driver driver_version = self.get_cache_key_driver_version(driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver_cache.py", line 151, in get_cache_key_driver_version return driver.get_driver_version_to_download() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\driver.py", line 48, in get_driver_version_to_download return self.get_latest_release_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\drivers\chrome.py", line 64, in get_latest_release_version resp = self._http_client.get(url=latest_release_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zjdn\AppData\Local\Programs\Python\Python312\Lib\site-packages\webdriver_manager\core\http.py", line 35, in get raise exceptions.ConnectionError(f"Could not reach host. Are you offline?") requests.exceptions.ConnectionError: Could not reach host. Are you offline?

麻烦问下,你这个重新执行还是一样的问题吗

是的,从新执行了好几次 都是这样

你直接访问下华为商城试试,看能否正常访问

@cnzh10000
Copy link
Author

可以正常访问

@ancoka
Copy link
Owner

ancoka commented Oct 9, 2023

可以正常访问

这个问题已经解决了,请更新代码,之前会一直默认下载驱动

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants