rahiel / telegram-send

Send messages and files over Telegram from the command-line.
https://www.rahielkasim.com/telegram-send/
GNU General Public License v3.0
938 stars 105 forks source link

AttributeError: module 'telegram' has no attribute 'utils' #98

Closed mwzhu closed 2 years ago

mwzhu commented 2 years ago

I am trying to run the telegram_send function but I am getting this error: File "/Users/local/Library/Caches/pypoetry/virtualenvs/lec-ditto-Gk5mZMv9-py3.8/lib/python3.8/site-packages/telegram_send.py", line 195, in send request = telegram.utils.request.Request(read_timeout=timeout) AttributeError: module 'telegram' has no attribute 'utils'

sachapan commented 2 years ago

I received a similar error after experimenting with a telegram project I was working on in python. The solution was to uninstall the "telegram" module:

pip3 uninstall telegram

This "telegram-send" module and the "telegram" module don't seem to peacefully co-exist.

rahiel commented 2 years ago

Yes this library depends on https://github.com/python-telegram-bot/python-telegram-bot, it will break if you have another module installed that uses the telegram name.