06-05 12:32:00 [ERROR] apscheduler | Job "live_sched (trigger: interval[0:00:10], next run at: 2023-06-05 12:32:05 CST)" raised an exception
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_sockets.py", line 186, in connect_tcp
addr_obj = ip_address(remote_host)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: 'www.bilibili.com' does not appear to be an IPv4 or IPv6 address
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_sockets.py", line 189, in connect_tcp
gai_res = await getaddrinfo(
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
yield
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 110, in connect_tcp
with anyio.fail_after(timeout):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\_core\_tasks.py", line 118, in __exit__
raise TimeoutError
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
raise exc
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 86, in handle_async_request
raise exc
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 63, in handle_async_request
stream = await self._connect(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_async\connection.py", line 111, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp
return await self._backend.connect_tcp(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp
with map_exceptions(exc_map):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "E:\IDEAyes\BOT\nonebot2\bot.py", line 59, in <module>
nonebot.run(app="__mp_main__:app")
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot\__init__.py", line 309, in run
get_driver().run(*args, **kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
uvicorn.run(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\uvicorn\main.py", line 569, in run
server.run()
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 633, in run_until_complete
self.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 600, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1896, in _run_once
handle._run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
> File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\apscheduler\executors\base_py3.py", line 30, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\haruka_bot\plugins\pusher\live_pusher.py", line 22, in live_sched
res = await get_rooms_info_by_uids(uids, reqtype="web", proxies=PROXIES)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\bilireq\live\__init__.py", line 14, in get_rooms_info_by_uids
return await post(url, json=data, auth=auth, reqtype=reqtype, **kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\bilireq\utils\__init__.py", line 102, in post
return await request("POST", url, **kwargs)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\bilireq\utils\__init__.py", line 85, in request
raw_json: Dict[str, Any] = (await _request(method, url, **kwargs)).json()
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\bilireq\utils\__init__.py", line 73, in _request
cookies.update(await get_homepage_cookies(proxies))
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\bilireq\utils\__init__.py", line 30, in get_homepage_cookies
resp = await client.request(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1620, in send
response = await self._send_handling_auth(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectTimeout
运行环境
windows10
HarukaBot 版本
1.5.4
go-cqhttp 版本
v11
错误描述
apscheduler爆出连接超时错误(ConnectTimeout) 文件路径:E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\apscheduler\executors\base_py3.py【第30行】 错误的源头是代码中的live_sched函数开始的。在live_sched函数中调用了get_rooms_info_by_uids函数,该函数又调用了post函数,最终导致了连接超时的异常。具体的代码文件和行数如下: 文件路径:E:\IDEAyes\BOT\nonebot2\venv\lib\site-packages\haruka_bot\plugins\pusher\live_pusher.py【第22行】
报错日志(如果有)
No response