Python Speedtest面临认证问题的ssl.c:1056

2024-10-02 16:21:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在speedtestapi上使用以下代码

    def get_bytes(self):
        s = speedtest.Speedtest()
        s.get_best_server()
        s.download()
        s.upload()
        res = s.results.dict()
        print(res["download"], res["upload"], res["ping"])

然而,我在这个连接上遇到了一些问题。我总是收到这个错误。在

^{pr2}$

我在macosmojave上使用python3.7,并且已经尝试在virtualenv上更新certifi

你知道吗?在


Tags: 代码selfgetbytesserverdownloaddefres
1条回答
网友
1楼 · 发布于 2024-10-02 16:21:32

伙计们,我终于找到了错误。 在这种情况下,您需要在您的计算机上安装认证。在

证书包括: MacintoshHD>;“应用程序”>;“Python 3.7”>;“安装”证书.命令在

双击certifications,它将运行此解决方案。在

相关问题 更多 >