【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记
生活随笔
收集整理的這篇文章主要介紹了
【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
報(bào)錯(cuò):
Error occurred during loading data. Trying to use cache server
Error occurred during loading data. Trying to use cache server http://d2g6u4gh6d9rq0.cloudfront.net/browsers/fake_useragent_0.1.10.json Traceback (most recent call last):File "f:\python36\lib\urllib\request.py", line 1318, in do_openencode_chunked=req.has_header('Transfer-encoding'))File "f:\python36\lib\http\client.py", line 1239, in requestself._send_request(method, url, body, headers, encode_chunked)File "f:\python36\lib\http\client.py", line 1285, in _send_requestself.endheaders(body, encode_chunked=encode_chunked)File "f:\python36\lib\http\client.py", line 1234, in endheadersself._send_output(message_body, encode_chunked=encode_chunked)File "f:\python36\lib\http\client.py", line 1026, in _send_outputself.send(msg)File "f:\python36\lib\http\client.py", line 964, in sendself.connect()File "f:\python36\lib\http\client.py", line 1392, in connectsuper().connect()File "f:\python36\lib\http\client.py", line 936, in connect(self.host,self.port), self.timeout, self.source_address)File "f:\python36\lib\socket.py", line 724, in create_connectionraise errFile "f:\python36\lib\socket.py", line 713, in create_connectionsock.connect(sa) socket.timeout: timed outDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "f:\python36\lib\site-packages\fake_useragent\utils.py", line 67, in getcontext=context,File "f:\python36\lib\urllib\request.py", line 223, in urlopenreturn opener.open(url, data, timeout)File "f:\python36\lib\urllib\request.py", line 526, in openresponse = self._open(req, data)File "f:\python36\lib\urllib\request.py", line 544, in _open'_open', req)File "f:\python36\lib\urllib\request.py", line 504, in _call_chainresult = func(*args)File "f:\python36\lib\urllib\request.py", line 1361, in https_opencontext=self._context, check_hostname=self._check_hostname)File "f:\python36\lib\urllib\request.py", line 1320, in do_openraise URLError(err) urllib.error.URLError: <urlopen error timed out>During handling of the above exception, another exception occurred:Traceback (most recent call last):File "f:\python36\lib\site-packages\fake_useragent\utils.py", line 154, in loadfor item in get_browsers(verify_ssl=verify_ssl):File "f:\python36\lib\site-packages\fake_useragent\utils.py", line 97, in get_browsershtml = get(settings.BROWSERS_STATS_PAGE, verify_ssl=verify_ssl)File "f:\python36\lib\site-packages\fake_useragent\utils.py", line 84, in getraise FakeUserAgentError('Maximum amount of retries reached') fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached解決:
from fake_useragent import UserAgent ua = UserAgent(use_cache_server=False)總結(jié)
以上是生活随笔為你收集整理的【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 1017 Queueing at Ban
- 下一篇: 大年三十+大年初一两天访问量为0,太夸张