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

UnboundLocalError in handle_buttonpress #9

Open
YtvwlD opened this issue Mar 8, 2019 · 0 comments
Open

UnboundLocalError in handle_buttonpress #9

YtvwlD opened this issue Mar 8, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@YtvwlD
Copy link
Member

YtvwlD commented Mar 8, 2019

Sentry got this exception (internal public link):

UnboundLocalError: local variable 'answer' referenced before assignment
  File "app/run.py", line 63, in new_func
    old_func(bot, update)
  File "app/run.py", line 293, in handle_buttonpress
    bot.answer_callback_query(query.id, text=answer)

So, we somehow managed to fall through the cases in the if above - we probably should add an else.

The line of code: https://github.com/chaosdorf/telemete/blob/master/run.py#L296

@YtvwlD YtvwlD added the bug Something isn't working label Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant