日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记

發(fā)布時間:2024/2/28 python 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

報錯:

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)

總結

以上是生活随笔為你收集整理的【已解决】Error occurred during loading data. Trying to use cache server_Python系列学习笔记的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。