telegram.utils of develop branche
i can use the master branche , and i want to try some other features of the devekop branche , but i got always this error , and i have tried "pip install telegram" and "pip install python-telegram-bot" , it doesn't help , and even i del telegram in my config.yml , i got still this error , my system is ubuntu-22.04.2-desktop-amd64 , so what should i do ?
test@test-virtual-machine:~/crypto-signal$ sudo docker run --rm -ti -v $PWD/app:/app dev/crypto-signals:latest
Traceback (most recent call last):
File "app.py", line 17, in
same problem
@onradr @qq020608 temporal fix, set python-telegram-bot==13.13 in app/requirements-step-2.txt file.
@onradr @qq020608 temporal fix, set python-telegram-bot==13.13 in app/requirements-step-2.txt file.
I have another error because of that:
app_1 | Traceback (most recent call last):
app_1 | File "/app/app.py", line 17, in <module>
app_1 | from notification import Notifier
app_1 | File "/app/notification.py", line 27, in <module>
app_1 | from telegram.error import TimedOut as TelegramTimedOut
app_1 | File "/usr/local/lib/python3.12/site-packages/telegram/__init__.py", line 186, in <module>
app_1 | from .bot import Bot
app_1 | File "/usr/local/lib/python3.12/site-packages/telegram/bot.py", line 106, in <module>
app_1 | from telegram.utils.request import Request
app_1 | File "/usr/local/lib/python3.12/site-packages/telegram/utils/request.py", line 44, in <module>
app_1 | import urllib3.contrib.appengine as appengine # type: ignore[no-redef]
app_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app_1 | ModuleNotFoundError: No module named 'urllib3.contrib.appengine'
All you need to do is to remove the second argument when creating a bot client. In init of TelegramNotifier just have this, instead of creation with Request argument:
self.bot = telegram.Bot(token=token)
And you can install the latest version of telegram client
@alkhachatryan yes, by doing that change, the latest version of python-telegram-bot (e.g 20.8) can be installed.
But, v20.x is a breaking version because it is built on top of asyncio module, and a lot of changes in app are required. In my opinion, it's not worth it. That's why I'm gonna freeze with 13.x version.
@laliux all required changes to telegram with asyncio ARE fixed in my repo: https://github.com/krypt0ra/station And now telegram notifier works like a charm.