roiiiu / nonebot-plugin-csgo-case-simulator

nonebot的CS2/CSGO开箱模拟器
MIT License
34 stars 9 forks source link

插件无法运行 #10

Closed 502milk closed 1 year ago

502milk commented 1 year ago

`08-10 21:31:02 [ERROR] nonebot | Failed to import "nonebot-plugin-csgo-case-simulator" Traceback (most recent call last): File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\anyio_core_sockets.py", line 189, in connect_tcp addr_obj = ip_address(remote_host) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\ipaddress.py", line 54, in ip_address raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address') ValueError: 'proxy.zhongpeiying.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:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_exceptions.py", line 10, in map_exceptions yield File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore\backends\asyncio.py", line 111, in connect_tcp stream: anyio.abc.ByteStream = await anyio.connect_tcp( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\anyio_core_sockets.py", line 192, in connect_tcp gai_res = await getaddrinfo( File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_transports\default.py", line 60, in map_httpcore_exceptions yield File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_transports\default.py", line 353, in handle_async_request resp = await self._pool.handle_async_request(req) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_async\connection_pool.py", line 253, in handle_async_request raise exc File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_async\connection_pool.py", line 237, in handle_async_request response = await connection.handle_async_request(request) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_async\connection.py", line 86, in handle_async_request raise exc File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_async\connection.py", line 63, in handle_async_request stream = await self._connect(request) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_async\connection.py", line 111, in _connect stream = await self._network_backend.connect_tcp(**kwargs) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore\backends\auto.py", line 29, in connect_tcp return await self._backend.connect_tcp( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore\backends\asyncio.py", line 109, in connect_tcp with map_exceptions(exc_map): File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 155, in exit self.gen.throw(typ, value, traceback) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) httpcore.ConnectError: [Errno 11001] getaddrinfo failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "E:\Bot\nonebot\testbot\bot.py", line 14, in nonebot.load_from_toml("pyproject.toml") File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\load.py", line 125, in load_from_toml return load_all_plugins(plugins, plugin_dirs) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\load.py", line 62, in load_all_plugins return manager.load_all_plugins() File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins return set( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 176, in filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 141, in load_plugin module = importlib.import_module(name) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot\plugin\manager.py", line 241, in exec_module super().exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot-plugin-csgo-case-simulator__init.py", line 25, in asyncio.run(get_all_json()) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot-plugin-csgo-case-simulator\init__.py", line 16, in get_all_json res = await asyncio.gather( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\nonebot-plugin-csgo-case-simulator\crates.py", line 26, in get_cases_json return await client.get(self.cases_api) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1757, in get return await self.request( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1533, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1620, in send response = await self._send_handling_auth( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1648, in _send_handling_auth response = await self._send_handling_redirects( File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1685, in _send_handling_redirects response = await self._send_single_request(request) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_client.py", line 1722, in _send_single_request response = await transport.handle_async_request(request) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_transports\default.py", line 352, in handle_async_request with map_httpcore_exceptions(): File "C:\Users\502\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 155, in exit__ self.gen.throw(typ, value, traceback) File "E:\Bot\nonebot\testbot.venv\Lib\site-packages\httpx_transports\default.py", line 77, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectError: [Errno 11001] getaddrinfo failed`

502milk commented 1 year ago

(虽然看得出来是代理的问题,但是我改成了本地http代理并不能跑起来 我太菜了XD

roiiiu commented 1 year ago

(虽然看得出来是代理的问题,但是我改成了本地http代理并不能跑起来 ~我太菜了XD~

其实也不全是🤔源api本身就会出问题,所以我走了我的域名中转,但是那个域名这几天到期了,近期有空的话我可能会重新写点这个项目🥹

502milk commented 1 year ago

(虽然看得出来是代理的问题,但是我改成了本地http代理并不能跑起来 ~我太菜了XD~

其实也不全是🤔源api本身就会出问题,所以我走了我的域名中转,但是那个域名这几天到期了,近期有空的话我可能会重新写点这个项目🥹

那倒不如直接外置代理吧😂或者两种代理可以自选一种

roiiiu commented 1 year ago

(虽然看得出来是代理的问题,但是我改成了本地http代理并不能跑起来 ~我太菜了XD~

其实也不全是🤔源api本身就会出问题,所以我走了我的域名中转,但是那个域名这几天到期了,近期有空的话我可能会重新写点这个项目🥹

~那倒不如直接外置代理吧😂~或者两种代理可以自选一种

临时修了一下,发了0.1.17版本,不通过代理了,可以试一下。😘

502milk commented 1 year ago

👍跑起来了好耶