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]: 启动/更新时提示 ModuleNotFoundError: No module named 'openai.error' #585

Closed
a86296007 opened this issue Nov 9, 2023 · 4 comments · Fixed by #587
Closed
Labels
bug? Bug或Bug修复相关 dependencies 依赖库相关

Comments

@a86296007
Copy link

部署方式

安装器部署

登录框架

Mirai

系统环境

Windows Server 2019 Datacenter

Python环境

Python 3.10

异常情况

启动时提示 ModuleNotFoundError: No module named 'openai.error' 随后卡死(已确认config.py中QQ相关信息填写无误)

报错信息

D:\QCG-2>cd QChatGPT

D:\QCG-2\QChatGPT>..\python\python.exe main.py
[2023-11-09 21:53:35.545] main.py (77) - [INFO] : 检查config模块完整性.
[2023-11-09 21:53:35.547] main.py (110) - [INFO] : 检查tips模块完整性.
Traceback (most recent call last):
File "D:\QCG-2\QChatGPT\main.py", line 177, in start
import pkg.openai.manager
File "D:\QCG-2\QChatGPT.\pkg\openai\manager.py", line 8, in
from pkg.openai.modelmgr import select_request_cls
File "D:\QCG-2\QChatGPT.\pkg\openai\modelmgr.py", line 9, in
import openai.error as aiE
ModuleNotFoundError: No module named 'openai.error'
[2023-11-09 21:53:35.952] main.py (284) - [ERROR] : 初始化失败:No module named 'openai.error'
[2023-11-09 21:53:37.954] main.py (290) - [INFO] : 您正在使用Windows系统,若命令行窗口处于“选择”模式,程序可能会被暂停,此时请右键点击窗口空白区域使其取消选择模式。
[2023-11-09 21:53:49.956] main.py (298) - [INFO] : QQ: 2727399847, MAH: localhost:54142
[2023-11-09 21:53:49.956] main.py (299) - [CRITICAL] : 程序启动完成,如长时间未显示 "成功登录到账号xxxxx" ,并且不回复消息,解决办法(请勿到群里问): #37

@a86296007 a86296007 added the bug? Bug或Bug修复相关 label Nov 9, 2023
@shenby1999
Copy link

删除modelmgr.py文件第9行import openai.error as aiE 后正常启动 可能是openai库版本原因

@a86296007
Copy link
Author

删除modelmgr.py文件第9行import openai.error as aiE 后正常启动 可能是openai库版本原因

删除这行之后是能启动了,但我尝试对话的时候没有任何回复也不报错(!help之类的命令倒是正常回复),继续发也不会触发并行限制提示(依然不回复),不知道是我的API配置有问题但报错的组件不存在了呢还是删掉之后整个功能都不运行了

@RockChinQ
Copy link
Owner

RockChinQ commented Nov 10, 2023

OpenAI库兼容性问题,请等待修复。

急需使用可以使用pip安装openai上周版本:

pip install openai==0.28.1

@RockChinQ RockChinQ added the dependencies 依赖库相关 label Nov 10, 2023
@RockChinQ RockChinQ linked a pull request Nov 10, 2023 that will close this issue
7 tasks
@RockChinQ
Copy link
Owner

已修复,请等待下一版本更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关 dependencies 依赖库相关
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants