E
Eric Belanger
Hi,
Before posting I made sure I upgraded from 2.3.3 to 2.3.4, but the
problem is still here.
Ive created a little script which, at the end of it, deals with copying
two files. All the script works fine except when its at the copy
line(s). Nothing gets copied, it crashes at the first open() line.
Before using open() I made it the lazy way first and wrote system("cp
"+file1+" "+file2), but gaves me that message:
IOError: [Errno 2] No such file or directory:
'/home/bilange/.hnb-backup/1087861694'
I then thought python didnt like file handling external commands, so I
tried open()'ing and dealing with read() and write(), without any more
luck (same error message).
After two hours of blindly trying to debug this i finally discovered
shutils (how to easily waste two hours by trying to reinvent the wheel
:/), which ALSO gives me that error message I just pasted.
Now I searched on the net for it, Im aware that sometimes for an obscure
reason (i think its on mod_python though) the last character from the
complete path may be omitted, which is not the case for me, I also tried
to str() the path (advice taken from some GUI python tutorial on the net
- theres no GUI in my case, but its a last resort attempt )
Heres some info you might need to help me debug this:
sys.version: 2.3.4 (#1, Jun 21 2004, 19:20:19) [GCC 3.3.3 20040412 (Red
Hat Linux 3.3.3-7)] (Thats Fedora Core 2, by the way)
the folder have "rwxrwxr-x" permission, and no file is present in the
directory. I tried to copy manually (from bash) the file and of course,
no problems here. The script is obviously run from the user bilange; im
editing and running the code from the same user.
If you need any more info, tell me.
Thanks in advance!
Eric Belanger
PS: The E-mail address is fake, but easy to figure out. I got enough
spam in my mailbox, thank you.
Before posting I made sure I upgraded from 2.3.3 to 2.3.4, but the
problem is still here.
Ive created a little script which, at the end of it, deals with copying
two files. All the script works fine except when its at the copy
line(s). Nothing gets copied, it crashes at the first open() line.
Before using open() I made it the lazy way first and wrote system("cp
"+file1+" "+file2), but gaves me that message:
IOError: [Errno 2] No such file or directory:
'/home/bilange/.hnb-backup/1087861694'
I then thought python didnt like file handling external commands, so I
tried open()'ing and dealing with read() and write(), without any more
luck (same error message).
After two hours of blindly trying to debug this i finally discovered
shutils (how to easily waste two hours by trying to reinvent the wheel
:/), which ALSO gives me that error message I just pasted.
Now I searched on the net for it, Im aware that sometimes for an obscure
reason (i think its on mod_python though) the last character from the
complete path may be omitted, which is not the case for me, I also tried
to str() the path (advice taken from some GUI python tutorial on the net
- theres no GUI in my case, but its a last resort attempt )
Heres some info you might need to help me debug this:
sys.version: 2.3.4 (#1, Jun 21 2004, 19:20:19) [GCC 3.3.3 20040412 (Red
Hat Linux 3.3.3-7)] (Thats Fedora Core 2, by the way)
the folder have "rwxrwxr-x" permission, and no file is present in the
directory. I tried to copy manually (from bash) the file and of course,
no problems here. The script is obviously run from the user bilange; im
editing and running the code from the same user.
If you need any more info, tell me.
Thanks in advance!
Eric Belanger
PS: The E-mail address is fake, but easy to figure out. I got enough
spam in my mailbox, thank you.