我正在尝试使用Python上的herepy包检索给定地址的地理坐标。当我在网络代理后面工作时,我已经用代理初始化了proxy环境变量。你知道吗
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')],)",),))
这里不提供和支持这个
herepy
包。除了JavaScript、Android和iosdk之外,我们还提供标准restapi。 请使用Python中的urllib(3)和其他标准请求库,它们提供了处理代理的方法。你知道吗相关问题 更多 >
编程相关推荐