小编Rap*_*Gil的帖子

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

我正在尝试在 Speedtest API 上使用以下代码

    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"])
Run Code Online (Sandbox Code Playgroud)

但是,我在这种连接方面遇到了一些问题。我每次都收到此错误。

speedtest.ConfigRetrievalError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
Run Code Online (Sandbox Code Playgroud)

我在 MacOS Mojave 上使用 Python 3.7 并且已经尝试在 virtualenv 上更新证书

你有什么主意吗?

python speed-test

1
推荐指数
1
解决办法
1353
查看次数

标签 统计

python ×1

speed-test ×1