bug with os.rename in 2.4.1?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Apr 28 19:23:14 CEST 2009

En Tue, 28 Apr 2009 14:15:54 -0300, Daniel Fetchinson  
<fetchinson at googlemail.com> escribió:

>> I have a job that runs hourly.  Part of the processing is to rename a
>> file using os.rename.  The file name is the same every hour.
>> Sometimes the os.rename fails and the file does not get renamed.  It
>> only happens occasionally.  Most of the time it works just fine.
> Unless you send a minimal version of the code you use and the complete
> traceback when an error occurs it will be impossible to help you.

Also, don'f forget to tell us the OS / environment you're using.
On Windows, you cannot rename a file while it is open by any process.

Gabriel Genellina

More information about the Python-list mailing list