Result: context.user_data is empty so we cannot get the name key in the following handler
Logs
[2019-10-17 21:43:57,658][bot.handlers.stickers.add][add:on_pack_name:99][INFO] >>> user selected the pack name from the keyboard
[2019-10-17 21:43:57,659][bot.handlers.stickers.add][add:on_pack_name:100][DEBUG] >>> user_data: {}
[2019-10-17 21:43:57,666][bot.utils.helpers.decorators][decorators:wrapped:35][ERROR] >>> error while running handler callback: 'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "/root/sticker-thief/bot/utils/helpers/decorators.py", line 33, in wrapped
return func(update, context, *args, **kwargs)
File "/root/sticker-thief/bot/handlers/stickers/add.py", line 115, in on_pack_name
pack_name = session.query(Pack).filter_by(title=selected_name).first().name
AttributeError: 'NoneType' object has no attribute 'name'
Steps to reproduce:
Result:
context.user_data
is empty so we cannot get thename
key in the following handlerLogs