我将使用Python上的herepy包检索给定地址的地理坐标。当我在网络代理后面工作时,我已经用代理初始化了代理环境变量。
import os
import herepy
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
geocoderApi = herepy.GeocoderApi(HERE_AppID, HERE_AppCode)
response = geocoderApi.free_form('200 S Mathilda Sunnyvale CA')然而,当我运行代码时,我得到了SSLError。有人知道出了什么问题吗?
SSLError: HTTPSConnectionPool(host='geocoder.cit.api.here.com', port=443): Max retries exceeded with url: /6.2/geocode.json?searchtext=200+S+Mathilda+Sunnyvale+CA&app_id=xxxxxxxxxx&app_code=xxxxxxxxxxxxCaused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))发布于 2019-11-20 10:44:25
此处不提供和支持此herepy包。除了我们的JavaScript、安卓和IOS SDK之外,我们还提供标准的REST。请使用Python中的urllib(3)和其他标准请求库来处理代理。
https://stackoverflow.com/questions/58947710
复制相似问题