Home > other >  Unable to run Python Telegram Bot Package - Error
Unable to run Python Telegram Bot Package - Error

Time:01-11

Hello StackOverFlow Community.

I am working on a telegram bot but facing the error:

(stockAlert) PS D:\Development\StockAlert> python .\stockAlertBot.py Traceback (most recent call last): File "D:\Development\StockAlert\stockAlertBot.py", line 1, in <module> from telegram.ext.updater import Updater ModuleNotFoundError: No module named 'telegram.ext.updater'

  • I had worked on the same file on my Mac earlier but when I am trying to run it on a Windows machine it is not working.

Error Message: Error

Here is the list of installed packages: package_list

  • OS: Windows 11 Pro
  • Python Version: 3.9.15

Your help is appreciated. Thank you !

Things that I tried:

  • Uninstalling and installing the package
  • Created a new virtual environment and installing the package
  • Rebooting the system

CodePudding user response:

You have installed version 20.0 of python-telegram-bot but your code is written for version <=13.5. Please either upgrade your code to v20 by reading the release notes and the transition guide o install a version of PTB that is compatible with your code base.


Disclaimer: I'm currently the maintainer of python-telgeram-bot.

  • Related