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

KeyError: 'senderStaffId' #439

Open
xu4wang opened this issue Jul 24, 2023 · 4 comments
Open

KeyError: 'senderStaffId' #439

xu4wang opened this issue Jul 24, 2023 · 4 comments

Comments

@xu4wang
Copy link

xu4wang commented Jul 24, 2023

大家有碰到吗?

[INFO][2023-07-23 23:36:01][log.py:32] - [CHATGPT] api_base= proxy=
[INFO][2023-07-23 23:36:01][log.py:32] - [CHATGPT] query=hello
[INFO][2023-07-23 23:36:02][log.py:34] - [CHATGPT] reply=Hello! How can I assist you today?
[2023-07-23 23:36:02,782] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
  File "/home/user01/myenv38/lib/python3.8/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/user01/myenv38/lib/python3.8/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/user01/myenv38/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/user01/myenv38/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/user01/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 288, in chat
    handler.chat(dd, data)
  File "/home/user01/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 212, in chat
    reply_json = self.build_webhook_response(reply, data)
  File "/home/user01/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 169, in build_webhook_response
    staffid = data['senderStaffId']
KeyError: 'senderStaffId'
59.82.84.8 - - [23/Jul/2023 23:36:02] "POST / HTTP/1.1" 500 -
@YuJunping
Copy link

我也遇到了,怎么解决呀

@xu4wang
Copy link
Author

xu4wang commented Aug 16, 2023

我也遇到了,怎么解决呀

好像在正式环境没问题。

@YuJunping
Copy link

我也遇到了,怎么解决呀

好像在正式环境没问题。
正式环境指的什么

@xu4wang
Copy link
Author

xu4wang commented Aug 23, 2023

我碰到的问题是在dignding自己建的那个测试群里面出现的。

如果把bot上线后,自己建群。则没有问题。

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

2 participants