Python 3.10.4 EXE FAIL获取另一台计算机上的sslcertverificationerror

发布于 2025-02-12 08:18:15 字数 892 浏览 0 评论 0原文

python: 3.10.4

urllib3

Windows

简而言之,我创建了一个python失败,该失败从站点中获取一些信息,然后将其放入Excel文件中。 从main.py开始,我创建了一个.exe失败:

pyinstaller --onefile main.py

现在,如果我从计算机运行main.py或main.exe,则一切正常。 当我尝试从另一台计算机运行main.py或main.exe时,我会收到以下错误:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

昨天我尝试从另一台计算机运行相同的exe。我从另一台计算机上归档了错误。 即使我创建一个新的.EXE并尝试在另一台计算机上运行它,我再次遇到相同的错误。

我不知道这是否有帮助,但基本上是代码的一部分如下:

from urllib.request import urlopen
from bs4 import BeautifulSoup as BS

raw_info = BS(urlopen(url),'html.parser')

#Do stuff with raw_info

如果需要整个错误,我会从中裁剪出一些信息并在此处粘贴。

url = https://dashboard.elering.ee/api/nps/price?start=2022-06-29T22%3A00%3A00.000Z&end=2022-06-30T23%3A59%3A59.999Z
python: 3.10.4

urllib3

Windows

In short, I created a python fail that takes some information from a site and then puts it in a excel file.
From main.py I created an .exe fail as such:

pyinstaller --onefile main.py

Now if I run the main.py or main.exe from my computer everything works fine.
When I try to run ether the main.py or main.exe from another computer I get the following error:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

Yesterday when I tried to run the same .exe from the other computer everything worked fine but today when I try to run the .exe file from another computer I get the error.
Even when I create a new .exe and try to run it on the other computer I again get the same error.

I don't know if this helps but basically part of the code is as follows:

from urllib.request import urlopen
from bs4 import BeautifulSoup as BS

raw_info = BS(urlopen(url),'html.parser')

#Do stuff with raw_info

If the entire error is need I will crop out some information from it and paste it here.

url = https://dashboard.elering.ee/api/nps/price?start=2022-06-29T22%3A00%3A00.000Z&end=2022-06-30T23%3A59%3A59.999Z

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文