Registered Member
|
I am writing my data to a file and have opened a file in the following way:
outfilename = "mcc_dataout.txt" outfile = outfilepath + outfilename fout = open(outfile, "w") These lines are right at the beginning of my main() program. Every time I execute the program, it runs without any error, but when I debug it gives me the following error whenever the debug reaches the fout line: fout = open(outfile, "w") IOError: [Errno 2] No such file or directory: '../data/mcc_dataout.txt' I am using Arch Linux + Kdevelop 4.4 .1 + kdev-python1.4. |
Administrator
|
Are you invoking this debug run from within KDevelop?
If so, please checking the current working directory for the script - ../data likely does not exist from that position - preventing the automatic creation of the file.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Global Moderator
|
It is well possible that this behaviour is a bug. I just implemented it "as is", without paying special attention to working directories.
Can you give a minimal example of how to reproduce the problem? I'll look into it and fix it then.
I'm working on the KDevelop IDE.
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]