Discord bot via Visual Studio Code. Error message, how can I fix it?

Hello,

I'm currently programming a Discord bot using a tutorial to learn how to do it, and now I'm getting an error when selecting the file (see below). Next, I wanted to run "python Bot123" via the terminal in the app. (The file containing the code is called Bot123.)

Error message

C:\Users\goetz\AppData\Local\Programs\Python\Python313\python.exe: can't open file 'c:\\Users\\goetz\\OneDrive\\Documents\\Bot123.py': [Errno 2] No such file or directory

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
JanaL161
3 months ago

Python cannot read the file “Bot123.py”. For example, you have given the path incorrectly (with the “.py” ending) or it lacks permissions.

Otherwise try to put the file in your user folder, not using OneDrive.

halid2ud
2 months ago

If the file has no .py extension, it is normal that it does not work. Try to rename the file to vscode and add it to the ende .py.