yzyyz1387 / nonebot_plugin_code

nonebot2在线运行代码
MIT License
61 stars 9 forks source link

报错 #8

Open yeshang2007 opened 4 months ago

yeshang2007 commented 4 months ago
02-23 09:12:04 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_code, lineno=26) failed.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\anyio\streams\tls.py", line 131, in _call_sslobject_method
    result = func(*args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 975, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_backends\anyio.py", line 69, in start_tls
    ssl_stream = await anyio.streams.tls.TLSStream.wrap(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\anyio\streams\tls.py", line 123, in wrap
    await wrapper._call_sslobject_method(ssl_object.do_handshake)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\anyio\streams\tls.py", line 138, in _call_sslobject_method
    data = await self.transport_stream.receive()
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\anyio\_backends\_asyncio.py", line 1203, in receive
    await self._protocol.read_event.wait()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\locks.py", line 214, in wait
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
    yield
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_backends\anyio.py", line 78, in start_tls
    raise exc
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_backends\anyio.py", line 68, in start_tls
    with anyio.fail_after(timeout):
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\anyio\_core\_tasks.py", line 119, in __exit__
    raise TimeoutError
TimeoutError

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

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
    yield
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_async\connection_pool.py", line 262, in handle_async_request
    raise exc
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_async\connection_pool.py", line 245, in handle_async_request
    response = await connection.handle_async_request(request)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_async\connection.py", line 92, in handle_async_request
    raise exc
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_async\connection.py", line 69, in handle_async_request
    stream = await self._connect(request)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_async\connection.py", line 149, in _connect
    stream = await stream.start_tls(**kwargs)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_backends\anyio.py", line 66, in start_tls
    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 "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout

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

Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\__init__.py", line 333, in run
    get_driver().run(*args, **kwargs)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 185, in run
    uvicorn.run(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\uvicorn\main.py", line 587, in run
    server.run()
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\uvicorn\server.py", line 62, 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 636, 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 603, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1906, 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 "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
    await _run_matcher(
> File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 842, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 817, in simple_run
    await handler(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 106, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot_plugin_code\__init__.py", line 32, in runcode_body
    res = await run(code)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\nonebot_plugin_code\run.py", line 83, in run
    res = await client.post(url=f'https://glot.io/run/{codeType[lang][0]}?version=latest', headers=headers, json=dataJson)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1848, in post
    return await self.request(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1617, in send
    response = await self._send_handling_auth(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
  File "C:\Users\Administrator\Desktop\nb\.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 "C:\Users\Administrator\Desktop\nb\.venv\lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout