Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 无法启动 #91

Closed
SuperGuGuGu opened this issue Jan 19, 2024 · 6 comments
Closed

Bug: 无法启动 #91

SuperGuGuGu opened this issue Jan 19, 2024 · 6 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@SuperGuGuGu
Copy link

操作系统

Windows

Python 版本

3.11.6

NoneBot 版本

2.1.3

飞书适配器版本

2.3.1

描述问题

安装适配器后启动报错

复现步骤

1.新建nb项目
2.驱动器:httpx
3.适配器:飞书
4.cd feishubot
5.nb run

期望的结果

No response

截图或日志

Snipaste_2024-01-19_17-34-49

@SuperGuGuGu SuperGuGuGu added the bug Something isn't working label Jan 19, 2024
@StarHeartHunt
Copy link
Member

检查一下虚拟环境里是否有 nonebot1 和 nonebot2 混装

@StarHeartHunt StarHeartHunt added question Further information is requested wontfix This will not be worked on and removed bug Something isn't working labels Jan 19, 2024
@StarHeartHunt
Copy link
Member

虚拟环境使用nb-cli新建的虚拟环境,不存在nonebot1

我这边没有复现成功,上面报错里面有 CommandSession 只可能是 NoneBot 1 由于各种原因被装进来了(比如误操作或者某些插件写错依赖),你可以自己激活一下 venv,pip uninstall 掉 nb1 和 nb2 再重新装 nb2。

@SuperGuGuGu
Copy link
Author

只装nb2后会报另一个错误。
Snipaste_2024-01-19_23-07-07

复现步骤:【
nb 创建项目(bootstrap httpx 飞书 立刻安装依赖 创建虚拟环境)
(现在创建貌似没有nb1)
pip uninstall nonebot
pip install nonebot2
nb run

@SuperGuGuGu
Copy link
Author

Snipaste_2024-01-19_23-25-20
Snipaste_2024-01-19_23-30-45

另外,飞书适配器应该使用哪个驱动器?曾经使用fastapi可以正常运行,现在使用fastapi或者httpx均不可运行

@StarHeartHunt
Copy link
Member

Snipaste_2024-01-19_23-25-20 Snipaste_2024-01-19_23-30-45

另外,飞书适配器应该使用哪个驱动器?曾经使用fastapi可以正常运行,现在使用fastapi或者httpx均不可运行

根据适配器规范,飞书现在不再直接依赖 httpx,而是通过 nb2 提供,所以需要同时启用 fastapi 和 httpx driver

@SuperGuGuGu
Copy link
Author

已成功启动运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants