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

RuntimeError: {"ret":500,"msg":null} 请问如何解决? #228

Open
2 tasks done
ccinoo opened this issue Feb 5, 2025 · 6 comments
Open
2 tasks done

RuntimeError: {"ret":500,"msg":null} 请问如何解决? #228

ccinoo opened this issue Feb 5, 2025 · 6 comments

Comments

@ccinoo
Copy link

ccinoo commented Feb 5, 2025

前置确认

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

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

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

操作系统类型?

Linux

运行的python版本是?

python 3.7

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

Latest Release

运行的channel类型是?

other

复现步骤 🕹

No response

问题描述 😯

你好,我使用的是容器部署,配置的gewechat channel,日志中提示“AppID: wx_zH_Y4UmWDH 已在线,无需登录”和 “[gewechat] 收到gewechat服务发送的回调测试消息”,但接着就有如下报错,无法正常使用。请问如何解决,谢谢。

AppID: wx_zH_Y4UmWDH 已在线,无需登录
[DEBUG][2025-02-05 22:50:19][gewechat_channel.py:183] - [gewechat] 收到gewechat服务发送的回调测试消息
172.30.0.1:39616 - - [05/Feb/2025 22:50:19] "HTTP/1.1 POST /v2/api/callback/collect" - 200 OK
Exception in thread Thread-2 (set_callback):
Traceback (most recent call last):
File "/app/lib/gewechat/util/http_util.py", line 20, in post_json
raise RuntimeError(response.text)
RuntimeError: {"ret":500,"msg":null}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/app/channel/gewechat/gewechat_channel.py", line 88, in set_callback
callback_resp = self.client.set_callback(self.token, callback_url)
File "/app/lib/gewechat/client.py", line 257, in set_callback
return self._login_api.set_callback(token, callback_url)
File "/app/lib/gewechat/api/login_api.py", line 21, in set_callback
return post_json(self.base_url, "/tools/setCallback", self.token, param)
File "/app/lib/gewechat/util/http_util.py", line 23, in post_json
raise RuntimeError(str(e))
RuntimeError: {"ret":500,"msg":null}

终端日志 📒

<此处粘贴终端日志>
@hanfangyuan4396
Copy link
Owner

删除config.json中gewechat_token试试

@ccinoo
Copy link
Author

ccinoo commented Feb 7, 2025

删除config.json中gewechat_token试试

谢谢回复,删除gewechat_token后,重启容器。日志如下,没有报错了,但是发消息后没有任何反应。

[DEBUG][2025-02-07 07:46:43][plugin.py:28] - loading plugin config, plugin_name=Hello, conf=None [DEBUG][2025-02-07 07:46:43][hello.py:126] - No Hello plugin config.json, use plugins/hello/config.json.template [INFO][2025-02-07 07:46:43][hello.py:38] - [Hello] inited [INFO][2025-02-07 07:46:43][finish.py:23] - [Finish] inited AppID: wx_XaUV6 Zb0 已在线,无需登录 [INFO][2025-02-07 07:46:43][gewechat_channel.py:84] - [gewechat] sleep 3 seconds waiting for server to start, then set callback [INFO][2025-02-07 07:46:43][gewechat_channel.py:102] - [gewechat] start callback server: http://192.168.1.103:9919/v2/api/callback/collect, using port 9919 http://0.0.0.0:9919/ [DEBUG][2025-02-07 07:46:46][gewechat_channel.py:178] - [gewechat] receive data: b'{"testMsg":"\xe5\x9b\x9e\xe8\xb0\x83\xe5\x9c\xb0\xe5\x9d\x80\xe9\x93\xbe\xe6\x8e\xa5\xe6\x88\x90\xe5\x8a\x9f\xef\xbc\x81","token":"38b294a 80 8a1e6b"}' [DEBUG][2025-02-07 07:46:46][gewechat_channel.py:183] - [gewechat] 收到gewechat服务发送的回调测试消息 172.30.0.1:44774 - - [07/Feb/2025 07:46:46] "HTTP/1.1 POST /v2/api/callback/collect" - 200 OK [INFO][2025-02-07 07:46:46][gewechat_channel.py:92] - [gewechat] callback set successfully

@xiaoyuwww123
Copy link

我也有同样的问题,同求

@shaomingchan
Copy link

我也是

@lizhe2004
Copy link

可以 通过手动调用gewechat的 退出接口 来将状态恢复为未登录状态,进而重新登录。(如果第一次手工调用logout接口返回500的话,可以多试几次。)

https://apifox.com/apidoc/shared-69ba62ca-cb7d-437e-85e4-6f3d3df271b1/api-196794630

@ccinoo
Copy link
Author

ccinoo commented Feb 11, 2025

可以 通过手动调用gewechat的 退出接口 来将状态恢复为未登录状态,进而重新登录。(如果第一次手工调用logout接口返回500的话,可以多试几次。)

https://apifox.com/apidoc/shared-69ba62ca-cb7d-437e-85e4-6f3d3df271b1/api-196794630

非常感谢。
目前我是通过删除设备号后重新注册登录,暂时运行正常。
如果后续还出现此类问题时,会尝试次方法。

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

5 participants