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

之前一直正常,更新后出现ModuleNotFoundError: No module named 'png',智普AI换讯飞星火都没能解决 #2341

Closed
2 tasks done
readzhy opened this issue Oct 16, 2024 · 6 comments

Comments

@readzhy
Copy link

readzhy commented Oct 16, 2024

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Docker

运行的python版本是?

python 3.10

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

log1016
日志

问题描述 😯

No response

终端日志 📒

[INFO][2024-10-16 23:40:54][godcmd.py:210] - [Godcmd] inited
[INFO][2024-10-16 23:40:54][keyword.py:40] - [keyword] {}
[INFO][2024-10-16 23:40:54][keyword.py:42] - [keyword] inited.
[WARNING][2024-10-16 23:40:54][banwords.py:54] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords .
[WARNING][2024-10-16 23:40:54][plugin_manager.py:150] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt'
[INFO][2024-10-16 23:40:54][linkai.py:35] - [LinkAI] inited, config={'group_app_map': {'测试群名1': 'default', '测试群名2': 'Kv2fXJcH'}, 'midjourney': {'enabled': False, 'auto_translate': True, 'img_proxy': True, 'max_tasks': 3, 'max_tasks_per_user': 1, 'use_image_create_prefix': True}, 'summary': {'enabled': False, 'group_enabled': True, 'max_file_size': 5000, 'type': ['FILE', 'SHARING']}}
[WARNING][2024-10-16 23:40:58][tool.py:27] - [tool] init failed, ignore
[WARNING][2024-10-16 23:40:58][plugin_manager.py:150] - Failed to init TOOL, diabled. config.json not found
[INFO][2024-10-16 23:40:58][role.py:69] - [Role] inited
[INFO][2024-10-16 23:40:58][dungeon.py:56] - [Dungeon] inited
[WARNING][2024-10-16 23:40:58][bdunit.py:42] - [BDunit] init failed, ignore
[WARNING][2024-10-16 23:40:58][plugin_manager.py:150] - Failed to init BDUNIT, diabled. config.json not found
[INFO][2024-10-16 23:40:58][hello.py:38] - [Hello] inited
[INFO][2024-10-16 23:40:58][finish.py:23] - [Finish] inited
[ERROR][2024-10-16 23:40:58][wechat_channel.py:138] - No module named 'png'
Traceback (most recent call last):
File "/app/channel/wechat/wechat_channel.py", line 124, in startup
itchat.auto_login(
File "/app/lib/itchat/components/register.py", line 34, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "/app/lib/itchat/components/login.py", line 56, in login
qrStorage = self.get_QR(enableCmdQR=enableCmdQR,
File "/app/lib/itchat/components/login.py", line 130, in get_QR
qrCode.png(qrStorage, scale=10)
File "/usr/local/lib/python3.10/site-packages/pyqrcode/init.py", line 462, in png
builder._png(self.code, self.version, file, scale,
File "/usr/local/lib/python3.10/site-packages/pyqrcode/builder.py", line 1266, in _png
import png
ModuleNotFoundError: No module named 'png'

@JackQian12
Copy link

同问

@CChengYangYang
Copy link

降低qrcode版本试试,用7.4.2版本

@Saboteur7
Copy link
Collaborator

降低qrcode版本试试,用7.4.2版本

正解

@Saboteur7
Copy link
Collaborator

重新卸载并安装 qrcode 依赖,版本为 7.4.2

requirements.txt 中已更新并固定版本

@readzhy
Copy link
Author

readzhy commented Oct 20, 2024

降低qrcode版本试试,用7.4.2版本

我用的docker安装的,怎么搞?

@Saboteur7
Copy link
Collaborator

我用的docker安装的,怎么搞?

该问题在最新版本已修复,https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/1.7.3,下载最新源码和dock镜像重新运行即可解决

docker部署方式: 执行 docker pull zhayujie/chatgpt-on-wechat 更新镜像

已有的源码下载方式:需手动卸载 qrcode 依赖并重新下载

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants