微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 ESRI arcgis python api 时出现 SSL 错误

如何解决使用 ESRI arcgis python api 时出现 SSL 错误

对于我公司的项目,我需要使用 ESRI arcgis python API 来访问我们 Enterprise ArcGIS 门户中的数据。 安装 arcgis 库后,我通过 GIS() 对连接进行了测试。 代码如下

gis = GIS( profile="link to the portal",username ="username",password="password",verify_cert = False,proxy_host='username:password@proxy_host',proxy_port=proxy_port)

但它给了我如下错误

Please set verify_cert=False due to encountered SSL error: HTTPSConnectionPool(host='www.arcgis.com',port=443): Max retries exceeded with url: /sharing/rest/generatetoken (Caused by SSLError(SSLError(1,'[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)')))

即使我设置了verify_cert = False错误仍然存​​在 我也尝试事先在环境中设置代理

os.environ['https_proxy'] = "http://proxy"

也不走运。 我的 openssl 版本是 OpenSSL 1.1.1k 2021 年 3 月 25 日- 如果有人可以为我提供一些解决方案,我将不胜感激

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。