GraiaProject / Application

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

import graia初始报错 #143

Closed Viottery closed 3 years ago

Viottery commented 3 years ago

描述你遇到的问题: import时 Traceback (most recent call last): File "C:\Viottery\bot\t1.py", line 2, in from graia.application import GraiaMiraiApplication, Session File "C:\Users\U235-server\AppData\Roaming\Python\Python39\site-packages\graia\application__init__.py", line 18, in from graia.application.event.lifecycle import ( # for init lifecycle events File "C:\Users\U235-server\AppData\Roaming\Python\Python39\site-packages\graia\application\event\lifecycle.py", line 3, in from graia.broadcast.entities.event import Dispatchable, BaseDispatcher ImportError: cannot import name 'BaseDispatcher' from 'graia.broadcast.entities.event' (C:\Users\U235-server\AppData\Roaming\Python\Python39\site-packages\graia\broadcast\entities\event.py)

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

  1. ...运行开发文档中的第一个程序
  2. ...执行到第2行的import时发生问题

发生错误的代码

控制台日志输出截图:

无控制台输出

运行环境:

Viottery commented 3 years ago

找到一样的问题了

Viottery commented 3 years ago

唔 下了pydanstic1.7.1仍未解决问题,还麻烦帮我看一下

GTODAA commented 3 years ago

问题解决了吗?能不能教教我,一样的问题