且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ConnectionResetError的异常:[Errno 54]连接由对等体重置

更新时间:2021-09-11 16:51:05

似乎 urllib 正在抛出异常。在python 3 ConnectionResetError 是一个内置的异常,只需使用:

It seems urllib is throwing the exception. In python 3 ConnectionResetError is a built in exception, just use:

except ConnectionResetError:

您似乎没有使用请求模块 - 这应该是您的提示。

You don't seem to be using the requests module in any case - that should have been your hint.