i can not successfully complete my deployment
harinishri005-hue
FREEOP

10 days ago

AttributeError: 'Updater' object has no attribute '_Updater__polling_cleanup_cb' and no dict for setting new attributes

Traceback (most recent call last):

File "/app/biobot_chatbot.py", line 364, in

main()

~~~~^^

File "/app/biobot_chatbot.py", line 336, in main

app = Application.builder().token(TELEGRAM_BOT_TOKEN).build()

File "/app/.venv/lib/python3.13/site-packages/telegram/ext/_applicationbuilder.py", line 312, in build

updater = Updater(bot=bot, update_queue=update_queue)

File "/app/.venv/lib/python3.13/site-packages/telegram/ext/_updater.py", line 128, in init

self.__polling_cleanup_cb: Optional[Callable[[], Coroutine[Any, Any, None]]] = None

^^^^^^^^^^^^^^^^^^^^^^^^^

/app/biobot_chatbot.py:10: FutureWarning:

All support for the google.generativeai package has ended. It will no longer be receiving

updates or bug fixes. Please switch to the google.genai package as soon as possible.

See README for more details:

https://github.com/google-gemini/deprecated-generative-ai-python/blob/main/README.md

import google.generativeai as genai

$10 Bounty

1 Replies

Status changed to Open Railway 10 days ago


andrewkat52
FREE

10 days ago

you have two separate issues , first your python version is 3.13 this breaks python-telegram-bot if you are on version 20.x. and the fix is simple, upgrade python-telegram-bot to 21.7 or above in your requirements.txt, that version officially added python 3.13 support latest stable is 22.3 so just pin it to that

second the google.generativeai warning is in your own traceback, that package is fully dead. replace google-generativeai with google-genai in requirements.txt and change your import line to "from google import genai"

those two changes fix both errors


Welcome!

Sign in to your Railway account to join the conversation.

Loading...