skip to Main Content

So basically the file is on the desktop/pythonBot folder, but the cmd cant open it up? The code I type in is python bot.py. I followed this dude’s guide here:
https://www.smartspate.com/how-to-create-a-telegram-bot-with-ai-in-30-lines-of-code-in-python/
(Sorry I am just a senior high student with no coding background)

2

Answers


  1. It looks like you are not in the correct directory, us cd to navigate to desktop/pythonBot or alternatively, use the full path when running the file.

    Login or Signup to reply.
  2. From screenshot i guessed you have .py in another directory.

    cmd is searching for “bot.py” file in C:Userss9800 directory.From error i can guess your bot.py file is in another direcotry.Provide full of .py file

    How to run .py file

    1st way :open cmd,drag and drop .py file to cmd and press enter

    2nd way:Go to directory where your .py file is.Wrtie “cmd” in address bar ,it will open cmd ,type file name and press enter.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search