whittlem / pycryptobot

Python Crypto Bot (PyCryptoBot)
Apache License 2.0
1.98k stars 741 forks source link

Telegram_bot not running after upgrade #706

Closed hoseinit closed 1 year ago

hoseinit commented 2 years ago

After upgrading from v6.0.0 to 6.3.0 I noticed that I can't run the telegram bot anymore. I could solve the issue by checking out to the beta branch. Nevertheless I am reporting the issue which others may also encounter.

# python3.9 telegram_bot.py
2022-05-04 18:05:34,498 - telegram.helper - INFO - Telegram Bot is listening
Traceback (most recent call last):
  File "/home/h1/telegram_bot.py", line 922, in <module>
    main()
  File "/home/h1/telegram_bot.py", line 907, in main
    botconfig.setcommands(None, None)
  File "/home/h1/telegram_bot.py", line 260, in setcommands
    self.helper.send_telegram_message(
  File "/home/h1/models/telegram/helper.py", line 235, in send_telegram_message
    context.bot.send_message(
AttributeError: 'Updater' object has no attribute 'send_message'
^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 1470, in _shutdown
    lock.acquire()

System info: NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian

Moneybox76 commented 2 years ago

Fix is merged into main yesterday: https://github.com/whittlem/pycryptobot/pull/707

whittlem commented 1 year ago

Fix is merged into main yesterday: https://github.com/whittlem/pycryptobot/pull/707

Thanks for confirming.