2 months ago
AttributeError: 'Updater' object has no attribute '_Updater__polling_cleanup_cb'
However, my code doesn’t use Updater at all (I’m using Application.builder() from python-telegram-bot 20+).
I updated requirements.txt to python-telegram-bot==20.7 and cleared build cache, but the build log still shows cached packages and the crash persists.
Could you help me fully clear the environment / cache or advise why an old Updater version might still be loaded?
8 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
Railway
Hey there! We've found the following might help you get unblocked faster: - [🧵 Python Telegram Bot Cannot Receive Messages](https://station.railway.com/questions/my-telegram-bot-is-not-connecting-with-t-afcad195) - [🧵 telegram bot scripts, issues in python interpreter](https://station.railway.com/questions/telegram-bot-scripts-issues-in-python-i-84da176a) - [🧵 Telegram bot deployed successfully but shutting down immediately](https://station.railway.com/questions/telegram-bot-deployed-successfully-but-s-8f36cbcd) - [🧵 telegram-bot-python](https://station.railway.com/templates/telegram-bot-python-e28f7303) If you find the answer from one of these, please let us know by solving the thread!
2 months ago
I have checked all the suggested links, but none solves the issue. It seems the environment still uses the old
Updaterclass even though I upgraded topython-telegram-bot==20.7. Please advise.
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
pridexpert-ui
I have checked all the suggested links, but none solves the issue. It seems the environment still uses the old Updater class even though I upgraded to python-telegram-bot==20.7. Please advise.
2 months ago
Hey, how sure are you that the cause is an old version of the said dependency? You can verify the installed version by inspecting your service's build logs.
uxuz
Hey, how sure are you that the cause is an old version of the said dependency? You can verify the installed version by inspecting your service's build logs.
2 months ago
My app uses Application.builder() from python-telegram-bot 20+, but deployment crashes with:
AttributeError: 'Updater' object has no attribute '_Updater__polling_cleanup_cb'
I’ve already updated requirements.txt to python-telegram-bot==20.7 and cleared the build cache, but the build log still shows:
pip install -r requirements.txt cached
So the old Updater code is still running.
Attachments
pridexpert-ui
My app uses Application.builder() from python-telegram-bot 20+, but deployment crashes with:AttributeError: 'Updater' object has no attribute '_Updater__polling_cleanup_cb'I’ve already updated requirements.txt to python-telegram-bot==20.7 and cleared the build cache, but the build log still shows:pip install -r requirements.txt cachedSo the old Updater code is still running.
2 months ago
Hey, you may try changing the builder to Nixpacks or write a custom Dockerfile. While this is not ideal, this is the fastest way to not reuse any cached content given that it is then no longer using Railpack. Alternatively, you can also try to deploy the service again as a new service.
2 months ago
On what uxuz said, I highly suggest using a Dockerfile simply because of how useful and versatile they are! You get a very good level of control over it, and it is sometimes much faster. Although they might seem scary at first, they are quite easy to get the hang of. I'm happy to advise on how to utilize it fully for this situation as well.
