cannot open file in write mode, no such file or directory

haynesc_at_gmail.com
Date: 02/28/05


Date: 28 Feb 2005 11:28:26 -0800

Hi,

I'm having a problem where when trying to open a file in write mode, I
get an IOError stating no such file or directory. I'm calling an
external program which takes an input file and produces an output file
repeatedly, simulating the input file separately for each replicate.
The error occurs when trying to open the input file to write out the
new data. The problem is difficult to reproduce since it only shows up
once every few thousand replicates. I've tried using both os.system
and os.popen to invoke the external program. Originally I was running
this on cygwin, but also tried under windows.

I'm confused as to why the error would state no such file when opening
in write mode, it should just create the file if it can't find it. I
imagine it has something to do with the external program (its mostly
likely not written very well), but I'm hoping theres a solution to this
that doesn't involve modifying that program. Is it possible that the
file isn't being closed properly? If so, how can I ensure it is
available?

Thanks



Relevant Pages

  • Re: cannot open file in write mode, no such file or directory
    ... > external program which takes an input file and produces an output ... simulating the input file separately for each replicate. ... calling an external program. ... Please post the exact message including the input filename at the time ...
    (comp.lang.python)
  • Re: cannot open file in write mode, no such file or directory
    ... >>get an IOError stating no such file or directory. ... >>external program which takes an input file and produces an output ... simulating the input file separately for each replicate. ... If you don't print the filename, ...
    (comp.lang.python)
  • Running External program from Matlab-waiting for results
    ... I'm using Matlab to create certain code for ther external program, ... the input file for the external program, ... dir of the window's command prompt (or as I like to call it the old ...
    (comp.soft-sys.matlab)
  • Re: direct parallel port access from Lisp (x86, Linux, CLISP or CMUCL)
    ... Thanks for the details about outb() and the suggestions about FFI, ... Meanwhile, calling the external program is working well, so I'll ...
    (comp.lang.lisp)
  • Re: cut -c18-31,49-51 in perl?
    ... ~~> a tight loop, there are usually several ways to fix it. ... ~~> external program can run the whole loop in one go, ... the chance that's perl isn't on the system is much ... Why isn't calling 'cut' legitimate, ...
    (comp.lang.perl.misc)