大佬教程收集整理的这篇文章主要介绍了geopy.exc.GeocoderServiceError: [SSL: CERTIFICATE_VERIFY_FAILED],大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我最近在使用 geopy,当我尝试使用它的地理编码器部分时,它给了我错误;
TraceBACk (most recent call last):
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 1346,in do_open
h.request(req.get_method(),req.SELEctor,req.data,headers,file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/clIEnt.py",line 1253,in request
self._send_request(method,url,body,encode_chunked)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/clIEnt.py",line 1299,in _send_request
self.endheaders(body,encode_chunked=encode_chunked)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/clIEnt.py",line 1248,in endheaders
self._send_output(message_body,line 1008,in _send_output
self.send(msg)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/clIEnt.py",line 948,in send
self.connect()
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/clIEnt.py",line 1422,in connect
self.sock = self._context.wrap_socket(self.sock,file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py",line 500,in wrap_socket
return self.sslsocket_class._create(
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py",line 1040,in _create
self.do_handshake()
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py",line 1309,in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_Failed] certificate verify Failed: unable to get local issuer certificate (_ssl.c:1129)
During handling of the above exception,another exception occurred:
TraceBACk (most recent call last):
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/adapters.py",line 251,in get_text
page = self.urlopen(req,timeout=timeout)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 517,in open
response = self._open(req,data)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 534,in _open
result = self._call_chain(self.handle_open,protocol,protocol +
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 494,in _call_chain
result = func(*args)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 1389,in https_open
return self.do_open(http.clIEnt.httpSConnection,req,file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py",line 1349,in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_Failed] certificate verify Failed: unable to get local issuer certificate (_ssl.c:1129)>
During handling of the above exception,another exception occurred:
TraceBACk (most recent call last):
file "/Users/syedrishad/Downloads/Code/python_basics/basics.py",line 8,in <module>
n= nom.geocode("3995 23rd St,San Francisco,CA 94114")
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/geocoders/arcgis.py",line 173,in geocode
return self._authenticated_call_geocoder(url,callBACk,timeout=timeout)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/geocoders/arcgis.py",line 260,in _authenticated_call_geocoder
return self._call_geocoder(url,parse_callBACk,timeout=timeout)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/geocoders/base.py",line 360,in _call_geocoder
result = self.adapter.get_Json(url,timeout=timeout,headers=req_headers)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/adapters.py",@R_48_5450@0,in get_Json
text = self.get_text(url,headers=headers)
file "/library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/geopy/adapters.py",line 268,in get_text
raise GeocoderserviceError(messagE)
geopy.exc.GeocoderserviceError: [SSL: CERTIFICATE_VERIFY_Failed] certificate verify Failed: unable to get local issuer certificate (_ssl.c:1129)
我搜索了这个错误,显然,我所要做的就是转到我的 python 文件夹并双击“安装 Certificates.command”文件。除了一件事。我在 Mac 上,这意味着我必须使用 brew install python3
命令下载 Python。我在任何地方都找不到 Python 文件夹,这意味着我无法双击“Install Certificates.command”文件。有没有人对我能做什么有任何建议。感谢任何和所有帮助
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
@H_616_20@以上是大佬教程为你收集整理的geopy.exc.GeocoderServiceError: [SSL: CERTIFICATE_VERIFY_FAILED]全部内容,希望文章能够帮你解决geopy.exc.GeocoderServiceError: [SSL: CERTIFICATE_VERIFY_FAILED]所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。