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

wechaty Pad协议,Dockerfile构建镜像启动时报错 #875

Closed
Gogoworks opened this issue Apr 18, 2023 · 15 comments
Closed

wechaty Pad协议,Dockerfile构建镜像启动时报错 #875

Gogoworks opened this issue Apr 18, 2023 · 15 comments

Comments

@Gogoworks
Copy link

前置确认

  1. 网络能够访问openai接口
  2. python 已安装:版本在 3.7 ~ 3.10 之间
  3. git pull 拉取最新代码
  4. 执行pip3 install -r requirements.txt,检查依赖是否满足
  5. 拓展功能请执行pip3 install -r requirements-optional.txt,检查依赖是否满足
  6. 在已有 issue 中未搜索到类似问题
  7. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
按照#649,正常启动wechaty后。

因为需要使用azure语音功能需安装依赖,所以按照Dockerfile.debian.latest构建镜像启动,发现报错。貌似是插件问题导致的,报错日志如下:

终端日志 (如有报错)

[INFO][2023-04-18 01:32:39][config.py:125] - [Config] User datas file not found, ignore. [INFO][2023-04-18 01:32:40][plugin_manager.py:59] - Loading plugins config... [INFO][2023-04-18 01:32:40][plugin_manager.py:77] - Scaning plugins ... chatgpt-tool-hub version: 0.3.14 chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get [ERROR][2023-04-18 01:32:40][plugin_manager.py:110] - Failed to import plugin tool: No module named 'webdriver_manager' Traceback (most recent call last): File "/app/plugins/plugin_manager.py", line 105, in scan_plugins self.loaded[plugin_path] = importlib.import_module( File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/app/plugins/tool/__init__.py", line 1, in <module> from .tool import * File "/app/plugins/tool/tool.py", line 4, in <module> from chatgpt_tool_hub.apps import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/__init__.py", line 1, in <module> from chatgpt_tool_hub.apps.load_app import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/load_app.py", line 7, in <module> from chatgpt_tool_hub.tools import dynamic_tool_loader File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/__init__.py", line 5, in <module> from chatgpt_tool_hub.tools.web_requests.browser import BrowserTool File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/__init__.py", line 42, in <module> from chatgpt_tool_hub.tools.web_requests.wrapper import RequestsWrapper File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 11, in <module> from webdriver_manager.chrome import ChromeDriverManager ModuleNotFoundError: No module named 'webdriver_manager' [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Hello_v0.1 registered, path=./plugins/hello [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Banwords_v1.0 registered, path=./plugins/banwords [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Finish_v1.0 registered, path=./plugins/finish [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Role_v1.0 registered, path=./plugins/role [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BDUNIT not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin FINISH not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][godcmd.py:183] - [Godcmd] 因未设置口令,本次的临时口令为4312。 [INFO][2023-04-18 01:32:40][godcmd.py:200] - [Godcmd] inited [WARNING][2023-04-18 01:32:40][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt' [INFO][2023-04-18 01:32:40][role.py:69] - [Role] inited [INFO][2023-04-18 01:32:40][dungeon.py:56] - [Dungeon] inited [WARNING][2023-04-18 01:32:40][bdunit.py:47] - [BDunit] init failed, ignore [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BDUNIT, diabled. config.json not found [INFO][2023-04-18 01:32:40][hello.py:23] - [Hello] inited [INFO][2023-04-18 01:32:40][finish.py:23] - [Finish] inited Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/wechaty/wechaty.py", line 445, in start await self.puppet.start() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 911, in start self._init_puppet() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 876, in _init_puppet raise WechatyPuppetGrpcError( wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)

[在此处粘贴终端日志, 可在主目录下`run.log`文件中找到]

Snipaste_2023-04-18_09-46-51

环境

  • 操作系统类型 (Mac/Windows/Linux):Linux
  • Python版本 ( 执行 python3 -V ):
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):
@lanvent
Copy link
Collaborator

lanvent commented Apr 18, 2023

这个是wechaty的问题,wechaty需要启用网关,换itchat是可以运行的。 图里的缺少依赖报错,你可以手动安装一下,它们目前只影响插件tool的使用。

@Gogoworks
Copy link
Author

Gogoworks commented Apr 18, 2023

这个是wechaty的问题,wechaty需要启用网关,换itchat是可以运行的。 图里的缺少依赖报错,你可以手动安装一下,它们目前只影响插件tool的使用。

感谢回复!我是按照#649,正常启动wechaty。请问启用网关应该添加什么操作?缺少依赖只是webdriver_manager吗?

@lanvent
Copy link
Collaborator

lanvent commented Apr 18, 2023

#244 里查找一下启用网关的操作

@Gogoworks
Copy link
Author

wechaty网关启动,查看日志也是正常。重新构建镜像,启动后仍然报错。webdriver_manager依赖也安装了。求助!

@Gogoworks
Copy link
Author

#244 里查找一下启用网关的操作

wechaty网关启动,查看日志也是正常。重新构建镜像,启动后仍然报错。webdriver_manager依赖也安装了。求助!

@lanvent
Copy link
Collaborator

lanvent commented Apr 18, 2023

检查wechaty网关的端口是否暴露给了另一个容器,如果没有公网IP,需参照#244 设置endpoint环境变量

@Gogoworks
Copy link
Author

检查wechaty网关的端口是否暴露给了另一个容器,如果没有公网IP,需参照#244 设置endpoint环境变量

服务部署在AWS,确定有公网IP。
你的意思是: 如果说其他服务占用了9001端口?会导致错误的发送吗?
export WECHATY_PUPPET_SERVER_PORT="9001" 9001是否可以自定义?

@Gogoworks
Copy link
Author

检查wechaty网关的端口是否暴露给了另一个容器

是需要隔离wechaty网关端口吗,只在容器内暴露?

@lsCoding666
Copy link

#244
中提到,设置了一个环境变量,讲端口指定在9001。但是我这里已经占用了这个端口了,所以我吧环境变量设置为9999.
重点来了,docker网关容器启动后,config.json channel切换到wxy,并且设置token为之前设置的uuid,修改channel/wechat/wechaty_channel.py。os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT'] = "127.0.0.1:9999"。以上修改如图所示
image
image
image

启动后报错
image
报错后发现,他这里提到的是网络 not good。于是curl 127.0.0.1:9999返回
image
而不是
image

说明docker确实跑在9999上了,但是没返回是怎么回事

@lsCoding666
Copy link

检查wechaty网关的端口是否暴露给了另一个容器

是需要隔离wechaty网关端口吗,只在容器内暴露?

docker run -ti --name wechaty_puppet_service_token_gateway --rm -e WECHATY_LOG -e WECHATY_PUPPET -e WECHATY_PUPPET_PADLOCAL_TOKEN -e WECHATY_PUPPET_SERVER_PORT -e WECHATY_TOKEN -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" wechaty/wechaty:1.11

使用1.11版本是因为从1.11版本开始才支持arm服务器

@lsCoding666
Copy link

前置确认

  1. 网络能够访问openai接口
  2. python 已安装:版本在 3.7 ~ 3.10 之间
  3. git pull 拉取最新代码
  4. 执行pip3 install -r requirements.txt,检查依赖是否满足
  5. 拓展功能请执行pip3 install -r requirements-optional.txt,检查依赖是否满足
  6. 在已有 issue 中未搜索到类似问题
  7. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
按照#649,正常启动wechaty后。

因为需要使用azure语音功能需安装依赖,所以按照Dockerfile.debian.latest构建镜像启动,发现报错。貌似是插件问题导致的,报错日志如下:

终端日志 (如有报错)

[INFO][2023-04-18 01:32:39][config.py:125] - [Config] User datas file not found, ignore. [INFO][2023-04-18 01:32:40][plugin_manager.py:59] - Loading plugins config... [INFO][2023-04-18 01:32:40][plugin_manager.py:77] - Scaning plugins ... chatgpt-tool-hub version: 0.3.14 chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get [ERROR][2023-04-18 01:32:40][plugin_manager.py:110] - Failed to import plugin tool: No module named 'webdriver_manager' Traceback (most recent call last): File "/app/plugins/plugin_manager.py", line 105, in scan_plugins self.loaded[plugin_path] = importlib.import_module( File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/app/plugins/tool/__init__.py", line 1, in <module> from .tool import * File "/app/plugins/tool/tool.py", line 4, in <module> from chatgpt_tool_hub.apps import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/__init__.py", line 1, in <module> from chatgpt_tool_hub.apps.load_app import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/load_app.py", line 7, in <module> from chatgpt_tool_hub.tools import dynamic_tool_loader File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/__init__.py", line 5, in <module> from chatgpt_tool_hub.tools.web_requests.browser import BrowserTool File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/__init__.py", line 42, in <module> from chatgpt_tool_hub.tools.web_requests.wrapper import RequestsWrapper File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 11, in <module> from webdriver_manager.chrome import ChromeDriverManager ModuleNotFoundError: No module named 'webdriver_manager' [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Hello_v0.1 registered, path=./plugins/hello [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Banwords_v1.0 registered, path=./plugins/banwords [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Finish_v1.0 registered, path=./plugins/finish [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Role_v1.0 registered, path=./plugins/role [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BDUNIT not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin FINISH not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][godcmd.py:183] - [Godcmd] 因未设置口令,本次的临时口令为4312。 [INFO][2023-04-18 01:32:40][godcmd.py:200] - [Godcmd] inited [WARNING][2023-04-18 01:32:40][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt' [INFO][2023-04-18 01:32:40][role.py:69] - [Role] inited [INFO][2023-04-18 01:32:40][dungeon.py:56] - [Dungeon] inited [WARNING][2023-04-18 01:32:40][bdunit.py:47] - [BDunit] init failed, ignore [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BDUNIT, diabled. config.json not found [INFO][2023-04-18 01:32:40][hello.py:23] - [Hello] inited [INFO][2023-04-18 01:32:40][finish.py:23] - [Finish] inited Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/wechaty/wechaty.py", line 445, in start await self.puppet.start() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 911, in start self._init_puppet() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 876, in _init_puppet raise WechatyPuppetGrpcError( wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)

[在此处粘贴终端日志, 可在主目录下`run.log`文件中找到]

Snipaste_2023-04-18_09-46-51

环境

  • 操作系统类型 (Mac/Windows/Linux):Linux
  • Python版本 ( 执行 python3 -V ):
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):

你这个原因应该是访问padlocal的网站失败了。他的网站是部署在heroku上的,估计是他的接口在你当地被墙了。
image

注意这句话 看来咱俩不是一个问题

@Gogoworks
Copy link
Author

前置确认

  1. 网络能够访问openai接口
  2. python 已安装:版本在 3.7 ~ 3.10 之间
  3. git pull 拉取最新代码
  4. 执行pip3 install -r requirements.txt,检查依赖是否满足
  5. 拓展功能请执行pip3 install -r requirements-optional.txt,检查依赖是否满足
  6. 在已有 issue 中未搜索到类似问题
  7. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
按照#649,正常启动wechaty后。

因为需要使用azure语音功能需安装依赖,所以按照Dockerfile.debian.latest构建镜像启动,发现报错。貌似是插件问题导致的,报错日志如下:

终端日志 (如有报错)

[INFO][2023-04-18 01:32:39][config.py:125] - [Config] User datas file not found, ignore. [INFO][2023-04-18 01:32:40][plugin_manager.py:59] - Loading plugins config... [INFO][2023-04-18 01:32:40][plugin_manager.py:77] - Scaning plugins ... chatgpt-tool-hub version: 0.3.14 chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get [ERROR][2023-04-18 01:32:40][plugin_manager.py:110] - Failed to import plugin tool: No module named 'webdriver_manager' Traceback (most recent call last): File "/app/plugins/plugin_manager.py", line 105, in scan_plugins self.loaded[plugin_path] = importlib.import_module( File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/app/plugins/tool/__init__.py", line 1, in <module> from .tool import * File "/app/plugins/tool/tool.py", line 4, in <module> from chatgpt_tool_hub.apps import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/__init__.py", line 1, in <module> from chatgpt_tool_hub.apps.load_app import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/load_app.py", line 7, in <module> from chatgpt_tool_hub.tools import dynamic_tool_loader File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/__init__.py", line 5, in <module> from chatgpt_tool_hub.tools.web_requests.browser import BrowserTool File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/__init__.py", line 42, in <module> from chatgpt_tool_hub.tools.web_requests.wrapper import RequestsWrapper File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 11, in <module> from webdriver_manager.chrome import ChromeDriverManager ModuleNotFoundError: No module named 'webdriver_manager' [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Hello_v0.1 registered, path=./plugins/hello [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Banwords_v1.0 registered, path=./plugins/banwords [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Finish_v1.0 registered, path=./plugins/finish [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Role_v1.0 registered, path=./plugins/role [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BDUNIT not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin FINISH not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][godcmd.py:183] - [Godcmd] 因未设置口令,本次的临时口令为4312。 [INFO][2023-04-18 01:32:40][godcmd.py:200] - [Godcmd] inited [WARNING][2023-04-18 01:32:40][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt' [INFO][2023-04-18 01:32:40][role.py:69] - [Role] inited [INFO][2023-04-18 01:32:40][dungeon.py:56] - [Dungeon] inited [WARNING][2023-04-18 01:32:40][bdunit.py:47] - [BDunit] init failed, ignore [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BDUNIT, diabled. config.json not found [INFO][2023-04-18 01:32:40][hello.py:23] - [Hello] inited [INFO][2023-04-18 01:32:40][finish.py:23] - [Finish] inited Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/wechaty/wechaty.py", line 445, in start await self.puppet.start() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 911, in start self._init_puppet() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 876, in _init_puppet raise WechatyPuppetGrpcError( wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)

[在此处粘贴终端日志, 可在主目录下`run.log`文件中找到]

Snipaste_2023-04-18_09-46-51

环境

  • 操作系统类型 (Mac/Windows/Linux):Linux
  • Python版本 ( 执行 python3 -V ):
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):

你这个原因应该是访问padlocal的网站失败了。他的网站是部署在heroku上的,估计是他的接口在你当地被墙了。 image

注意这句话 看来咱俩不是一个问题

尝试过各种方式去解决,目前只能换服务器部署尝试。

@Gogoworks
Copy link
Author

检查wechaty网关的端口是否暴露给了另一个容器

是需要隔离wechaty网关端口吗,只在容器内暴露?

docker run -ti --name wechaty_puppet_service_token_gateway --rm -e WECHATY_LOG -e WECHATY_PUPPET -e WECHATY_PUPPET_PADLOCAL_TOKEN -e WECHATY_PUPPET_SERVER_PORT -e WECHATY_TOKEN -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" wechaty/wechaty:1.11

使用1.11版本是因为从1.11版本开始才支持arm服务器

wechaty 协议对插件貌似不支持吗?

@lsCoding666
Copy link

如果使用推荐的 好像是0.65版本吧 会报错 说arm架构不支持 跑不起来。新版本1.11支持了arm架构 所以就用了新版本

@Gogoworks
Copy link
Author

前置确认

  1. 网络能够访问openai接口
  2. python 已安装:版本在 3.7 ~ 3.10 之间
  3. git pull 拉取最新代码
  4. 执行pip3 install -r requirements.txt,检查依赖是否满足
  5. 拓展功能请执行pip3 install -r requirements-optional.txt,检查依赖是否满足
  6. 在已有 issue 中未搜索到类似问题
  7. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
按照#649,正常启动wechaty后。

因为需要使用azure语音功能需安装依赖,所以按照Dockerfile.debian.latest构建镜像启动,发现报错。貌似是插件问题导致的,报错日志如下:

终端日志 (如有报错)

[INFO][2023-04-18 01:32:39][config.py:125] - [Config] User datas file not found, ignore. [INFO][2023-04-18 01:32:40][plugin_manager.py:59] - Loading plugins config... [INFO][2023-04-18 01:32:40][plugin_manager.py:77] - Scaning plugins ... chatgpt-tool-hub version: 0.3.14 chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get [ERROR][2023-04-18 01:32:40][plugin_manager.py:110] - Failed to import plugin tool: No module named 'webdriver_manager' Traceback (most recent call last): File "/app/plugins/plugin_manager.py", line 105, in scan_plugins self.loaded[plugin_path] = importlib.import_module( File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/app/plugins/tool/__init__.py", line 1, in <module> from .tool import * File "/app/plugins/tool/tool.py", line 4, in <module> from chatgpt_tool_hub.apps import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/__init__.py", line 1, in <module> from chatgpt_tool_hub.apps.load_app import load_app File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/load_app.py", line 7, in <module> from chatgpt_tool_hub.tools import dynamic_tool_loader File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/__init__.py", line 5, in <module> from chatgpt_tool_hub.tools.web_requests.browser import BrowserTool File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/__init__.py", line 42, in <module> from chatgpt_tool_hub.tools.web_requests.wrapper import RequestsWrapper File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 11, in <module> from webdriver_manager.chrome import ChromeDriverManager ModuleNotFoundError: No module named 'webdriver_manager' [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Hello_v0.1 registered, path=./plugins/hello [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Banwords_v1.0 registered, path=./plugins/banwords [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Finish_v1.0 registered, path=./plugins/finish [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Role_v1.0 registered, path=./plugins/role [INFO][2023-04-18 01:32:40][plugin_manager.py:47] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin GODCMD not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BANWORDS not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin ROLE not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin DUNGEON not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin BDUNIT not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin HELLO not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][plugin_manager.py:122] - Plugin FINISH not found in pconfig, adding to pconfig... [INFO][2023-04-18 01:32:40][godcmd.py:183] - [Godcmd] 因未设置口令,本次的临时口令为4312。 [INFO][2023-04-18 01:32:40][godcmd.py:200] - [Godcmd] inited [WARNING][2023-04-18 01:32:40][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords . [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt' [INFO][2023-04-18 01:32:40][role.py:69] - [Role] inited [INFO][2023-04-18 01:32:40][dungeon.py:56] - [Dungeon] inited [WARNING][2023-04-18 01:32:40][bdunit.py:47] - [BDunit] init failed, ignore [ERROR][2023-04-18 01:32:40][plugin_manager.py:151] - Failed to init BDUNIT, diabled. config.json not found [INFO][2023-04-18 01:32:40][hello.py:23] - [Hello] inited [INFO][2023-04-18 01:32:40][finish.py:23] - [Finish] inited Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/wechaty/wechaty.py", line 445, in start await self.puppet.start() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 911, in start self._init_puppet() File "/usr/local/lib/python3.10/site-packages/wechaty_puppet_service/puppet.py", line 876, in _init_puppet raise WechatyPuppetGrpcError( wechaty_puppet.exceptions.WechatyPuppetGrpcError: WechatyPuppetGrpcError('can"t fetch endpoint from chatie server. You can try it later, or make sure that your pc can connect to heroku server ', None, None)

[在此处粘贴终端日志, 可在主目录下`run.log`文件中找到]

Snipaste_2023-04-18_09-46-51

环境

  • 操作系统类型 (Mac/Windows/Linux):Linux
  • Python版本 ( 执行 python3 -V ):
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):

你这个原因应该是访问padlocal的网站失败了。他的网站是部署在heroku上的,估计是他的接口在你当地被墙了。 image

注意这句话 看来咱俩不是一个问题

正解!!!

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

No branches or pull requests

3 participants