Reputation: 85
I am using Komodo IDE and have a python file that reads text from a text file, does calculations, then outputs to the console. I am using a command to run the file, with the phrase %(python3) -u "%F
in the command part.
When I run this file in debugger, it works fine, but when I run it using the command to output to Command Output, this error pops up:
Traceback (most recent call last):
File "C:\Users\Haseeb\Desktop\Saud\A School Work\Z-Computer Programming\ECOO Practice\2010Problem1.py", line 1, in <module>
f = open('2010DATA.txt', 'r')
FileNotFoundError: [Errno 2] No such file or directory: '2010DATA.txt'
This command runs other programs, just not ones that read from text files. Here is a picture of the code, command and and error.
Any help would be highly appreciated.
Upvotes: 0
Views: 457
Reputation: 3474
You need to set the "Start in" directory to the directory on which you are executing your command, or refrain from using relative paths.
Upvotes: 1