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: cannot access local variable 'message_text' where it is not associated with a value #34

Closed
JakobLichterfeld opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JakobLichterfeld
Copy link
Owner

JakobLichterfeld commented Mar 21, 2024

v0.7.3 runs on test system, fails on production with:

teslamatetelegrambot | Traceback (most recent call last):
teslamatetelegrambot | File "/app/./src/teslamate_telegram_bot.py", line 227, in
teslamatetelegrambot | asyncio.run(main())
teslamatetelegrambot | File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
teslamatetelegrambot | return runner.run(main)
teslamatetelegrambot | ^^^^^^^^^^^^^^^^
teslamatetelegrambot | File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
teslamatetelegrambot | return self._loop.run_until_complete(task)
teslamatetelegrambot | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
teslamatetelegrambot | File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
teslamatetelegrambot | return future.result()
teslamatetelegrambot | ^^^^^^^^^^^^^^^
teslamatetelegrambot | File "/app/./src/teslamate_telegram_bot.py", line 205, in main
teslamatetelegrambot | await check_state_and_send_messages(bot, chat_id)
teslamatetelegrambot | File "/app/./src/teslamate_telegram_bot.py", line 172, in check_state_and_send_messages
teslamatetelegrambot | await send_telegram_message_to_chat_id(bot, chat_id, message_text)
teslamatetelegrambot | ^^^^^^^^^^^^
teslamatetelegrambot | UnboundLocalError: cannot access local variable 'message_text' where it is not associated with a value
teslamatetelegrambot exited with code 0

@JakobLichterfeld JakobLichterfeld added the bug Something isn't working label Mar 21, 2024
@JakobLichterfeld
Copy link
Owner Author

solved by 5d6267f

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