一周前更新过该插件,并且强制更新卡池,可以运行,但现在更新卡池会报错,这期间没有更新过hoshinobot
启动了PCRDATA_UPDATA为True,使用更新卡池命令时,会更新从1900号以后的角色数据,直到timeout
错误信息:
[2020-10-27 20:33:59,405 hoshino] INFO: 已开始更新角色1900的数据和图标
[2020-10-27 20:33:59,405 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190061.webp
[2020-10-27 20:34:07,907 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190061.webp. HTTP 404
[2020-10-27 20:34:07,908 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190031.webp
[2020-10-27 20:34:09,874 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190031.webp. HTTP 404
[2020-10-27 20:34:09,875 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190011.webp
[2020-10-27 20:34:13,279 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190011.webp. HTTP 404
[2020-10-27 20:34:13,281 hoshino] INFO: 已开始更新角色1907的数据和图标
[2020-10-27 20:34:13,281 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190761.webp
[2020-10-27 20:34:15,263 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190761.webp. HTTP 404
[2020-10-27 20:34:15,264 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190731.webp
[2020-10-27 20:34:18,384 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190731.webp. HTTP 404
[2020-10-27 20:34:18,385 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/190711.webp
[2020-10-27 20:34:19,992 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/190711.webp. HTTP 404
省略至1916
[2020-10-27 20:34:59,465 hoshino] INFO: 已开始更新角色1916的数据和图标
[2020-10-27 20:34:59,465 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/191661.webp
[2020-10-27 20:35:01,068 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/191661.webp. HTTP 404
[2020-10-27 20:35:01,069 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/191631.webp
[2020-10-27 20:35:07,250 chara] ERROR: Failed to download https://redive.estertion.win/icon/unit/191631.webp. <class 'requests.exceptions.ReadTimeout'>
[2020-10-27 20:35:07,251 chara] ERROR: HTTPSConnectionPool(host='redive.estertion.win', port=443): Read timed out. (read timeout=5)
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in validate_conn
conn.connect()
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connection.py", line 362, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/util/ssl.py", line 384, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/python3/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/python3/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/local/python3/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:1106: The handshake operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 384, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/usr/local/python3/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='redive.estertion.win', port=443): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/HoshinoBot/hoshino/modules/priconne/chara.py", line 118, in download_chara_icon
rsp = requests.get(url, stream=True, timeout=5)
File "/usr/local/python3/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='redive.estertion.win', port=443): Read timed out. (read timeout=5)
[2020-10-27 20:35:07,263 nonebot] ERROR: An exception occurred while running command ('更新卡池',):
[2020-10-27 20:35:07,263 nonebot] ERROR: local variable 'rsp' referenced before assignment
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/command/init.py", line 723, in _real_run_command
await asyncio.wait_for(future, timeout)
File "/usr/local/python3/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
return await fut
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/command/init.py", line 101, in run
await self.func(session)
File "/root/HoshinoBot/hoshino/modules/priconne/gacha/update.py", line 261, in update_pool_chat
status = await update_pool()
File "/root/HoshinoBot/hoshino/modules/priconne/gacha/update.py", line 227, in update_pool
await update_pcrdata()
File "/root/HoshinoBot/hoshino/modules/priconne/gacha/update.py", line 73, in update_pcrdata
download_chara_icon(id, 1)
File "/root/HoshinoBot/hoshino/modules/priconne/chara.py", line 122, in download_chara_icon
if 200 == rsp.status_code:
UnboundLocalError: local variable 'rsp' referenced before assignment