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

企业微信应用响应回复时报错 #2463

Open
2 tasks done
zfyzmh opened this issue Jan 10, 2025 · 5 comments
Open
2 tasks done

企业微信应用响应回复时报错 #2463

zfyzmh opened this issue Jan 10, 2025 · 5 comments

Comments

@zfyzmh
Copy link

zfyzmh commented Jan 10, 2025

前置确认

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

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

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

操作系统类型?

Linux

运行的python版本是?

python 3.7

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

Latest Release

运行的channel类型是?

other

复现步骤 🕹

[INFO][2025-01-10 03:40:43][chat_gpt_bot.py:57] - [CHATGPT] query=你好,测试企业微信机器人
[ERROR][2025-01-10 03:40:45][chat_channel.py:291] - [chat_channel] sendMsg error: 'NoneType' object is not subscriptable
[ERROR][2025-01-10 03:40:45][chat_channel.py:294] - 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/app/channel/chat_channel.py", line 289, in _send
self.send(reply, context)
File "/app/channel/wechatcom/wechatcomapp_channel.py", line 60, in send
self.client.message.send_text(self.agent_id, receiver, text)
File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/api/message.py", line 62, in send_text
return self.send(
File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/api/message.py", line 58, in send
return self._post('message/send', data=data)
File "/usr/local/lib/python3.10/site-packages/wechatpy/client/api/base.py", line 19, in _post
return self._client.post(url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 182, in post
return self._request(
File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 77, in request
kwargs['params']['access_token'] = self.access_token
File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 238, in access_token
access_token = self.session.get(self.access_token_key)
File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/init.py", line 43, in access_token_key
return '{0}
{1}_access_token'.format(self.corp_id, self.secret[:10])
TypeError: 'NoneType' object is not subscriptable

问题描述 😯

企业微信回复响应时报错

终端日志 📒

ww44947602a2a3f14f None 1000003 VRgmodrDAoAhxVkWMSSiQv7B2 1fITA7EhzTnpKRycCjoYBT2k7X0dI6TMhrsErtEcnya
[INFO][2025-01-10 03:40:19][wechatcomapp_channel.py:39] - [wechatcom] init: corp_id: ww44947602a2a3f14f, secret: None, agent_id: 1000003, token: VRgmodrDAoAhxVkWMSSiQv7B2, aes_key: 1fITA7EhzTnpKRycCjoYBT2k7X0dI6TMhrsErtEcnya
[INFO][2025-01-10 03:40:19][plugin_manager.py:50] - Loading plugins config...
[INFO][2025-01-10 03:40:19][plugin_manager.py:88] - Scaning plugins ...
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin linkai_v0.1.0 registered, path=./plugins/linkai
[INFO][2025-01-10 03:40:19][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
chatgpt-tool-hub version: 0.5.0
[INFO][2025-01-10 03:40:20][plugin_manager.py:41] - Plugin tool_v0.5 registered, path=./plugins/tool
[INFO][2025-01-10 03:40:20][godcmd.py:194] - [Godcmd] 因未设置口令,本次的临时口令为2718。
[INFO][2025-01-10 03:40:20][godcmd.py:210] - [Godcmd] inited
[INFO][2025-01-10 03:40:20][keyword.py:40] - [keyword] {}
[INFO][2025-01-10 03:40:20][keyword.py:42] - [keyword] inited.
[INFO][2025-01-10 03:40:20][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']}}
[INFO][2025-01-10 03:40:20][role.py:69] - [Role] inited
[INFO][2025-01-10 03:40:20][dungeon.py:56] - [Dungeon] inited
[INFO][2025-01-10 03:40:20][hello.py:38] - [Hello] inited
[INFO][2025-01-10 03:40:20][finish.py:23] - [Finish] inited
http://0.0.0.0:30101/
[INFO][2025-01-10 03:40:43][wechatcomapp_channel.py:153] - [wechatcom] receive params: <Storage {'nonce': '1736473284', 'timestamp': '1736480443', 'msg_signature': '0d1eb94f4c65308ab10a7d273a2954ced8f871b7'}>
192.168.26.20:60064 - - [10/Jan/2025 03:40:43] "HTTP/1.1 POST /wxcomapp" - 200 OK
[INFO][2025-01-10 03:40:43][bridge.py:68] - create bot chatGPT for chat
[INFO][2025-01-10 03:40:43][chat_gpt_bot.py:57] - [CHATGPT] query=你好,测试企业微信机器人
[ERROR][2025-01-10 03:40:45][chat_channel.py:291] - [chat_channel] sendMsg error: 'NoneType' object is not subscriptable
[ERROR][2025-01-10 03:40:45][chat_channel.py:294] - 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/app/channel/chat_channel.py", line 289, in _send
    self.send(reply, context)
  File "/app/channel/wechatcom/wechatcomapp_channel.py", line 60, in send
    self.client.message.send_text(self.agent_id, receiver, text)
  File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/api/message.py", line 62, in send_text
    return self.send(
  File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/api/message.py", line 58, in send
    return self._post('message/send', data=data)
  File "/usr/local/lib/python3.10/site-packages/wechatpy/client/api/base.py", line 19, in _post
    return self._client.post(url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 182, in post
    return self._request(
  File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 77, in _request
    kwargs['params']['access_token'] = self.access_token
  File "/usr/local/lib/python3.10/site-packages/wechatpy/client/base.py", line 238, in access_token
    access_token = self.session.get(self.access_token_key)
  File "/usr/local/lib/python3.10/site-packages/wechatpy/enterprise/client/__init__.py", line 43, in access_token_key
    return '{0}_{1}_access_token'.format(self.corp_id, self.secret[:10])
TypeError: 'NoneType' object is not subscriptable
[ERROR][2025-01-10 03:40:48][chat_channel.py:291] - [chat_channel] sendMsg error: 'NoneType' object is not subscriptable
[ERROR][2025-01-10 03:40:48][chat_channel.py:294] - 'NoneType' object is not subscriptable
@HugoSun
Copy link

HugoSun commented Jan 10, 2025

您好,请问用企业微信登录会被封号吗?交流一下

@zfyzmh
Copy link
Author

zfyzmh commented Jan 10, 2025

您好,请问用企业微信登录会被封号吗?交流一下

用的企业微信官方给的接口,肯定不会封啊

@zfyzmh
Copy link
Author

zfyzmh commented Jan 10, 2025

您好,请问用企业微信登录会被封号吗?交流一下

我现在还没部署成功呢,卡在这里了,后台看到消息接收到了,但是接下来就报异常

@HugoSun
Copy link

HugoSun commented Jan 10, 2025

您好,请问用企业微信登录会被封号吗?交流一下

我现在还没部署成功呢,卡在这里了,后台看到消息接收到了,但是接下来就报异常

方便留个QQ吗?和你交流一下

@zfyzmh
Copy link
Author

zfyzmh commented Jan 10, 2025

您好,请问用企业微信登录会被封号吗?交流一下

我现在还没部署成功呢,卡在这里了,后台看到消息接收到了,但是接下来就报异常

方便留个QQ吗?和你交流一下

可以 2693378384

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

2 participants