异步下载图片指令报错,打包的底层代码出错,有python大佬看看问题出在哪里吗
回答
收藏

异步下载图片指令报错,打包的底层代码出错,有python大佬看看问题出在哪里吗

c
cl自动机器人
2022-09-14 14:42·浏览量:917
c
cl自动机器人
发布于 2022-09-14 14:42917浏览

不知道是输入的变量还是什么地方出现了问题。

报错如下:


[错误] [2022-09-13 16:34:39,818] 【】中应用执行失败: C:\Users\CLserver01_2\AppData\Local\ShadowBot\users\e93ed14b-288b-41a1-ad15-fbfc2df9c96e\apps\91ae2737-cf60-4157-8da9-b104e785b627\venv\lib\site-packages\requests\__init__.py:104: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (5.0.0)/charset_normalizer (2.0.10) doesn't match a supported version!
RequestsDependencyWarning)
Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
Traceback (most recent call last):
File "C:\Users\CLserver01_2\AppData\Local\ShadowBot\users\e93ed14b-288b-41a1-ad15-fbfc2df9c96e\apps\91ae2737-cf60-4157-8da9-b104e785b627\xbot_extensions\activity_5a867757\multi_download_img.py", line 35, in download_image
urllib.request.urlretrieve(image_url, os.path.join(destination, image_name))
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "D:\Program Files (x86)\ShadowBot\shadowbot-5.3.29\python\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\CLserver01_2\AppData\Local\ShadowBot\users\e93ed14b-288b-41a1-ad15-fbfc2df9c96e\apps\91ae2737-cf60-4157-8da9-b104e785b627\venv\lib\site-packages\fake_useragent\utils.py", line 154, in load
for item in get_browsers(verify_ssl=verify_ssl):
File "C:\Users\CLserver01_2\AppData\Local\ShadowBot\users\e93ed14b-288b-41a1-ad15-fbfc2df9c96e\apps\91ae2737-cf60-4157-8da9-b104e785b627\venv\lib\site-packages\fake_useragent\utils.py", line 99, in get_browsers
html = html.split('<table class="w3-table-all notranslate">')[1]
IndexError: list index out of range

收藏
全部回答1
最新
发布回答
回答