简体   繁体   English

SSL 使用 python pvlib 库时出现证书错误

[英]SSL Certificate Error when using python pvlib library

I am trying to use the python pvlib library to get weather forecast data and it worked at the beginning, but now I keep getting this SSL Certificate Error.我正在尝试使用 python pvlib库获取天气预报数据并且它在开始时有效,但现在我不断收到此 SSL 证书错误。 Could you help me with resolving this issue?你能帮我解决这个问题吗?

Code below:代码如下:

from pvlib.forecast import GFS, HRRR_ESRL, NAM, NDFD, HRRR, RAP

fm = GFS()
data = fm.get_data(latitude, longitude, start, end)

Error message:错误信息:

SSLError: HTTPSConnectionPool(host='thredds.ucar.edu', port=443): Max retries exceeded with url: /thredds/catalog.xml (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)'))) SSLError: HTTPSConnectionPool(host='thredds.ucar.edu', port=443): Max retries exceeded with url: /thredds/catalog.xml (由 SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败引起:无法获取本地颁发者证书 (_ssl.c:1123)')))

I was using my company laptop, and it looks like the error was associated with the VPN connection issue.我使用的是我公司的笔记本电脑,看起来错误与 VPN 连接问题有关。 The code runs fine when I'm at the office using the office wifi, but it does not work at home.当我在办公室使用办公室 wifi 时,代码运行良好,但在家里不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM