Closed msenior85 closed 11 months ago
@msenior85 Hi. Parameter store_data of telegram.ext.BasePersistence expects and instance of the telegram.ext.PersistenceInput class, so you need to build such an instance.
Thanks @Bibo-Joshi. I guess the wiki and documentation could be improved to make this clear. I will submit a PR with an example bot using persistenceinput.
Steps to Reproduce
store_data
argument of thePersistence
class having a non-default valueAttributeError
Exception will be raised when starting the botExpected behaviour
Bot will start up without exception and start polling the telegram server for updates.
Actual behaviour
Exception is raised when starting the bot
Operating System
Ubuntu 22.04
Version of Python, python-telegram-bot & dependencies
Relevant log output
Additional Context
Exception is raised only when persistence is enabled with
store_data
having a user defined value such asstore_data=PersistenceInput.{bot, user, chat, callback}_data
. Defining persistence with default value forstore_data
does not raise an exception.Example code is provided below: