F:\ancode\lib\site-packages\urllib3\connectionpool.py in _make_request geopy包错误
timeout Traceback (most recent call last)
F:\ancode\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
342 try:
--> 343 self._validate_conn(conn)
344 except (SocketTimeout, BaseSSLError) as e:
F:\ancode\lib\site-packages\urllib3\connectionpool.py in _validate_conn(self, conn)
848 if not getattr(conn, 'sock', None): # AppEngine might not have `.sock`
--> 849 conn.connect()
850
F:\ancode\lib\site-packages\urllib3\connection.py in connect(self)
355 server_hostname=hostname,
--> 356 ssl_context=context)
357
F:\ancode\lib\site-packages\urllib3\util\ssl_.py in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ciphers, ssl_context, ca_cert_dir)
358 if HAS_SNI and server_hostname is not None:
--> 359 return context.wrap_socket(sock, server_hostname=server_hostname)
360
F:\ancode\lib\ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session)
411 context=self,
--> 412 session=session
413 )
F:\ancode\lib\ssl.py in _create(cls, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, context, session)
849 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
--> 850 self.do_handshake()
851 except (OSError, ValueError):
F:\ancode\lib\ssl.py in do_handshake(self, block)
1107 self.settimeout(None)
-> 1108 self._sslobj.do_handshake()
1109 finally:
timeout: _ssl.c:1029: The handshake operation timed out
运行程序遇到的错误,一开始在网上搜各种解决方法,把很多包卸了重装发现都解决不了,鼓弄了一下午,后来发现不是安装包的问题,因为我把环境从anaconda换成python3.10还是出现一样的错误,最后发现都是request请求出错,我甚至还把connectionpool的文件替换掉,改了里面报错的函数,也没有用,后来发现因为自己调用了geopy包,需要获得地理位置,于是在里面加了timeout之后发现问题就没有了,自己真是一个大傻缺
geolocator.geocode(x,timeout=100).latitude 在里面加一个时延
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanhgcicgf
系列文章
更多
同类精品
更多
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
excel下划线不显示怎么办
PHP中文网 06-23 -
怎样阻止微信小程序自动打开
PHP中文网 06-13 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
TikTok加速器哪个好免费的TK加速器推荐
TK小达人 10-01