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

Fix "cannot access local variable" for bot direct messages #1737

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

cpwetteronline
Copy link
Contributor

On my Danswer installation I noticed this error in the background service when I sent a direct message to the bot user:

06/28/2024 09:40:19 AM          listener.py 415 : Failed to process slack event
  File "/app/danswer/danswerbot/slack/listener.py", line 413, in process_slack_event
  File "/app/danswer/danswerbot/slack/listener.py", line 353, in process_message
  File "/app/danswer/danswerbot/slack/handlers/handle_message.py", line 277, in handle_message
    if respond_slack_group_list:
UnboundLocalError: cannot access local variable 'respond_slack_group_list' where it is not associated with a value

I'm not familiar with the code or why the error is occuring now but this minor change should fix it (I already tested it on my installation)

Copy link

vercel bot commented Jun 28, 2024

@cpwetteronline is attempting to deploy a commit to the Danswer Team on Vercel.

A member of the Team first needs to authorize it.

@yuhongsun96 yuhongsun96 merged commit 3ebac62 into danswer-ai:main Jul 2, 2024
6 of 7 checks passed
@yuhongsun96
Copy link
Contributor

Awesome! Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

3 participants