“蜜汁error,可能就像情绪那样莫测吧”
urllib.error.URLError目前遇到两种出现形式:
urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>
解决方案(因无权限,没有亲测):yum install openssl
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:852)>
解决方案:urllib.request.urlretrieve(file_url, filepath, _progress)中涉及的file_url可能包含https,将其替换为http问题解决。