赞
踩
报错信息:
Traceback (most recent call last): File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\connectionpool.py", line 711, in urlopen self._prepare_proxy(conn) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\connectionpool.py", line 1007, in _prepare_proxy conn.connect() File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\connection.py", line 369, in connect self.sock = conn = self._connect_tls_proxy(hostname, conn) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\connection.py", line 504, in _connect_tls_proxy socket = ssl_wrap_socket( File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "C:\Program Files (x86)\software\python_wxw\python38\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Program Files (x86)\software\python_wxw\python38\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Program Files (x86)\software\python_wxw\python38\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen retries = retries.increment( File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='open.iot.10086.cn', port=443): Max retries exceeded with url: /fuse/http/device/thing/property/post?topic=$sys/fs1W2mxU41/licheepi4a/thing/property/post&protocol=http (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Users/wuboy/PycharmProjects/my_project/onent_wxw/main.py", line 23, in <module> response = requests.request("POST", url, headers=headers, data=payload) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "C:\Program Files (x86)\software\python_wxw\python38\Lib\site-packages\requests\adapters.py", line 513, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='open.iot.10086.cn', port=443): Max retries exceeded with url: /fuse/http/device/thing/property/post?topic=$sys/fs1W2mxU41/licheepi4a/thing/property/post&protocol=http (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))) Process finished with exit code 1
解决方法:
关闭梯子就行
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。