chatgpt-on-wechat
chatgpt-on-wechat copied to clipboard
公众号运行app.py一直显示openai.error
前置确认
- [X] 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。
⚠️ 搜索issues中是否已存在类似问题
- [X] 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue
操作系统类型?
Linux
运行的python版本是?
python 3.8
使用的chatgpt-on-wechat版本是?
Latest Release
运行的channel
类型是?
wechatmp(公众号, 订阅号)
复现步骤 🕹
是不是程序有问题啊,微信公众号每次卡在bot 你好
[INFO][2023-12-27 16:33:07][bridge.py:49] - create bot chatGPT for chat
[ERROR][2023-12-27 16:33:07][wechatmp_channel.py:233] - [wechatmp] Fail to generate reply to user, msgId=24391045656748517, exception=No module named 'openai.error'
Traceback (most recent call last):
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/ubuntu/chatgpt-on-wechat/channel/chat_channel.py", line 168, in _handle
reply = self._generate_reply(context)
File "/home/ubuntu/chatgpt-on-wechat/channel/chat_channel.py", line 178, in _generate_reply
e_context = PluginManager().emit_event(
File "/home/ubuntu/chatgpt-on-wechat/plugins/plugin_manager.py", line 189, in emit_event
instance.handlers[e_context.event](e_context, *args, **kwargs)
File "/home/ubuntu/chatgpt-on-wechat/plugins/role/role.py", line 104, in on_handle_context
bot = Bridge().get_bot("chat")
File "/home/ubuntu/chatgpt-on-wechat/bridge/bridge.py", line 55, in get_bot
self.bots[typename] = create_bot(self.btype[typename])
File "/home/ubuntu/chatgpt-on-wechat/bot/bot_factory.py", line 22, in create_bot
from bot.chatgpt.chat_gpt_bot import ChatGPTBot
File "/home/ubuntu/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 6, in
问题描述 😯
微信公众号openai3.5模型调用,出现问题,一直卡在ModuleNotFoundError: No module named 'openai.error',
终端日志 📒
<此处粘贴终端日志>
```[INFO][2023-12-27 16:32:00][app.py:17] - signal 2 received, exiting...
[INFO][2023-12-27 16:32:00][config.py:208] - [Config] User datas saved.
[INFO][2023-12-27 16:33:01][config.py:249] - [INIT] load config: {'channel_type': 'wechatmp', 'model': 'gpt-3.5-turbo',>[INFO][2023-12-27 16:33:01][config.py:197] - [Config] User datas loaded.
[WARNING][2023-12-27 16:33:01][audio_convert.py:9] - import pysilk failed, wechaty voice message will not be supported.
[INFO][2023-12-27 16:33:01][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-12-27 16:33:01][plugin_manager.py:88] - Scaning plugins ...
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[WARNING][2023-12-27 16:33:01][plugin_manager.py:113] - Failed to import plugin tool: No module named 'chatgpt_tool_hub'[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-12-27 16:33:01][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins/linkai
[INFO][2023-12-27 16:33:01][godcmd.py:194] - [Godcmd] 因未设置口令,本次的临时口令为7289。
[INFO][2023-12-27 16:33:01][godcmd.py:210] - [Godcmd] inited
[INFO][2023-12-27 16:33:01][keyword.py:40] - [keyword] {}
[INFO][2023-12-27 16:33:01][keyword.py:42] - [keyword] inited.
[INFO][2023-12-27 16:33:01][linkai.py:33] - [LinkAI] inited, config={'group_app_map': {'测试群名1': 'default', '测试群[>[INFO][2023-12-27 16:33:01][role.py:69] - [Role] inited
[INFO][2023-12-27 16:33:01][dungeon.py:56] - [Dungeon] inited
[INFO][2023-12-27 16:33:01][hello.py:24] - [Hello] inited
[INFO][2023-12-27 16:33:01][finish.py:23] - [Finish] inited
[INFO][2023-12-27 16:33:07][passive_reply.py:97] - [wechatmp] Request 1 from o9kwx52DsD8ljpY2_8BkbO6AoXP4 2439104565674>bot 你好
[INFO][2023-12-27 16:33:07][bridge.py:49] - create bot chatGPT for chat
[ERROR][2023-12-27 16:33:07][wechatmp_channel.py:233] - [wechatmp] Fail to generate reply to user, msgId=24391045656748>Traceback (most recent call last):
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/ubuntu/chatgpt-on-wechat/channel/chat_channel.py", line 168, in _handle
reply = self._generate_reply(context)
File "/home/ubuntu/chatgpt-on-wechat/channel/chat_channel.py", line 178, in _generate_reply
e_context = PluginManager().emit_event(
File "/home/ubuntu/chatgpt-on-wechat/plugins/plugin_manager.py", line 189, in emit_event
instance.handlers[e_context.event](e_context, *args, **kwargs)
File "/home/ubuntu/chatgpt-on-wechat/plugins/role/role.py", line 104, in on_handle_context
bot = Bridge().get_bot("chat")
File "/home/ubuntu/chatgpt-on-wechat/bridge/bridge.py", line 55, in get_bot
self.bots[typename] = create_bot(self.btype[typename])
File "/home/ubuntu/chatgpt-on-wechat/bot/bot_factory.py", line 22, in create_bot
from bot.chatgpt.chat_gpt_bot import ChatGPTBot
File "/home/ubuntu/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 6, in <module>
import openai.error
ModuleNotFoundError: No module named 'openai.error'
[INFO][2023-12-27 16:33:53][app.py:17] - signal 2 received, exiting...
[INFO][2023-12-27 16:33:53][config.py:208] - [Config] User datas saved.
openai版本要和作者的一致,新版本移除了openai.error
openai版本要和作者的一致,新版本移除了openai.error
请问这里的openai版本是指的哪个版本呢 我是直接从git克隆的作者的项目到本地部署的 错误提示跟上面这位大哥一样 也是显示没有openai.error模块
我也是这个错误提示 微信扫码登陆后 个微群聊艾特时出现日志 ModuleNotFoundError: No module named 'openai.error'
openai版本要和作者的一致,新版本移除了openai.error
请问这里的openai版本是指的哪个版本呢 我是直接从git克隆的作者的项目到本地部署的 错误提示跟上面这位大哥一样 也是显示没有openai.error模块
要和作者的版本一致,你看一下你的版本,应该不是作者那个版本
openai版本要和作者的一致,新版本移除了openai.error
请问这里的openai版本是指的哪个版本呢 我是直接从git克隆的作者的项目到本地部署的 错误提示跟上面这位大哥一样 也是显示没有openai.error模块
要和作者的版本一致,你看一下你的版本,应该不是作者那个版本
大佬如何查看作者版本的openai啊?
我也是这个错误提示 微信扫码登陆后 个微群聊艾特时出现日志 ModuleNotFoundError: No module named 'openai.error'
请问解决了吗!!!
openai版本要和作者的一致,新版本移除了openai.error
请问这里的openai版本是指的哪个版本呢 我是直接从git克隆的作者的项目到本地部署的 错误提示跟上面这位大哥一样 也是显示没有openai.error模块
要和作者的版本一致,你看一下你的版本,应该不是作者那个版本
大佬如何查看作者版本的openai啊?
pip show openai
openai版本要和作者的一致,新版本移除了openai.error
请问这里的openai版本是指的哪个版本呢 我是直接从git克隆的作者的项目到本地部署的 错误提示跟上面这位大哥一样 也是显示没有openai.error模块
要和作者的版本一致,你看一下你的版本,应该不是作者那个版本
大佬如何查看作者版本的openai啊?
pip show openai
作者是openai==0.27.8,你的版本应该更新,先卸载pip uninstall openai,再重装pip install openai==0.27.8
openai 版本要和作者的一致,新版本删除了 openai.error
请问这里的openai版本是指哪个版本呢 我是直接从git克隆作者的项目到本地部署的错误提示跟上面没有这位大哥一样也显示openai.error模块
要和作者的版本一致,你看一下你的版本,应该不是作者那个版本
大佬如何查看作者版本的openai啊?
pip 显示 openai
作者是openai==0.27.8,你的版本应该更新,先卸载pip uninstall openai,再重装pip install openai==0.27.8
非常感谢回复!!!再请教一下,有遇到过吗 钉钉调用以后,出现这个[WARNING][2024-07-22 08:47:14][session_manager.py:72] - Exception when counting tokens precisely for prompt: No module named 'tiktoken'
module 是gpt-4 我每次看openapi的官网,发现也是有调用过的