Git Product home page Git Product logo

Comments (3)

lennon624 avatar lennon624 commented on September 16, 2024
[2022-12-10 00:59:25.745] main.py (69) - [INFO] : 程序启动完成
2022-12-10 00:59:25 - WARNING  未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 `uvicorn` 或 `hypercorn`。
在命令行键入:
    pip install uvicorn
或者
    pip install hypercorn
[2022-12-10 00:59:25.746] bot.py (260) - [WARNING] : 未找到可用的 ASGI 服务,反向 WebSocket 和 WebHook 上报将不可用。
仅 HTTP 轮询与正向 WebSocket 可用。
建议安装 ASGI 服务器,如 `uvicorn` 或 `hypercorn`。
在命令行键入:
    pip install uvicorn
或者
    pip install hypercorn
2022-12-10 00:59:25 - ERROR    As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
[2022-12-10 00:59:25.751] base.py (43) - [ERROR] : As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
Exception in thread Thread-2 (run):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/dist-packages/mirai/bot.py", line 197, in run
    MiraiRunner(self).run(host, port, asgi_server, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/mirai/bot.py", line 274, in run
    asyncio.run(self._run())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/dist-packages/mirai/bot.py", line 238, in _run
    await self.startup()
  File "/usr/local/lib/python3.10/dist-packages/mirai/bot.py", line 226, in startup
    await asyncio.gather(*coros)
  File "/usr/local/lib/python3.10/dist-packages/mirai/bot.py", line 135, in startup
    await self._adapter.login(self.qq)
  File "/usr/local/lib/python3.10/dist-packages/mirai/adapters/base.py", line 35, in wrapped
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/mirai/adapters/websocket.py", line 187, in login
    self.connection = await connect(self.host_name, extra_headers=headers)
  File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 622, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1107, in _create_connection_transport
    protocol = protocol_factory()
  File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 160, in __init__
    super().__init__(**kwargs)
  File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 154, in __init__
    self._drain_lock = asyncio.Lock(
  File "/usr/lib/python3.10/asyncio/locks.py", line 78, in __init__
    super().__init__(loop=loop)
  File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary

格式乱了。。重新发下

from qchatgpt.

RockChinQ avatar RockChinQ commented on September 16, 2024

解决办法

  • 由安装器进行部署的,到安装器目录执行以下指令

    • Linux
      python/bin/pip install websockets --upgrade
    • Windows
      python\Scripts\pip3 install websockets --upgrade
  • 手动部署的
    pip3 install websockets --upgrade

yirimirai默认安装的websockets库版本过低,参见YiriMiraiProject/YiriMirai#49

from qchatgpt.

Ajwyunsx avatar Ajwyunsx commented on September 16, 2024

Traceback (most recent call last): File "main.py", line 14, in from pkg.utils.log import init_runtime_log_file, reset_logging File "/home/ajw/QChatGPT/pkg/utils/init.py", line 1, in from .threadctl import ThreadCtl File "/home/ajw/QChatGPT/pkg/utils/threadctl.py", line 52 def submit(self, pool: Pool, fn, /, *args, **kwargs ):

from qchatgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.