GraiaProject / Application

一个设计精巧, 协议实现完备的, 基于 mirai-api-http 的即时聊天软件自动化框架.
https://graia-document.vercel.app/
GNU Affero General Public License v3.0
438 stars 63 forks source link

运行文档中例程时报错:TypeError: unhashable type: 'dict' #153

Closed Mavacer closed 2 years ago

Mavacer commented 3 years ago

描述你遇到的问题: 运行文档中的例程时报错

复现步骤: 该 BUG 会在进行以下操作后出现:

  1. 使用poetry安装graia-application-mirai
  2. 修正lifecycle.py中对BaseDispathcer的引用
  3. poetry run python 运行文档中提到的例程(已将authKey修改为verifyKey)

发生错误的代码

控制台日志输出截图:

{'beforeDispatch': [], 'afterDispatch': [], 'beforeExecution': [], 'afterExecution': [], 'beforeTargetExec': [], 'afterTargetExec': []} Traceback (most recent call last): File "/data/data/com.termux/files/home/graia/graia/hello_world.py", line 12, in app = GraiaMiraiApplication( File "/data/data/com.termux/files/home/.cache/pypoetry/virtualenvs/graia-ZKzXdU8U-py3.9/lib/python3.9/site-packages/graia/application/init.py", line 200, in init self.broadcast.dispatcher_interface.inject_global_raw( File "/data/data/com.termux/files/home/.cache/pypoetry/virtualenvs/graia-ZKzXdU8U-py3.9/lib/python3.9/site-packages/graia/broadcast/interfaces/dispatcher.py", line 114, in inject_global_raw self.flush_lifecycle_refs(dispatchers) File "/data/data/com.termux/files/home/.cache/pypoetry/virtualenvs/graia-ZKzXdU8U-py3.9/lib/python3.9/site-packages/graia/broadcast/interfaces/dispatcher.py", line 88, in flush_lifecycle_refs self.get_lifecycle_refs(dispatcher, lifecycle_refs) TypeError: unhashable type: 'dict' [2021-07-22 14:20:46,019][ERROR]: Unclosed client session 运行环境:

[额外信息:]

karakoo commented 3 years ago

这是bcc的问题,可以先回退版本

147