Re: shutil.rmtree raises "OSError: [Errno 39] Directory not empty" exception

2009-07-12 Thread Sean DiZazzo
On Jul 10, 5:10 pm, Tim Chase wrote: > >      shutil.rmtree(filename) > >    File "/usr/lib64/python2.5/shutil.py", line 178, in rmtree > >      onerror(os.rmdir, path, sys.exc_info()) > >    File "/usr/lib64/python2.5/shutil.py", line 176, in rmtree > >      os.rmdir(path) > > OSError: [Errno 39]

Re: shutil.rmtree raises "OSError: [Errno 39] Directory not empty" exception

2009-07-10 Thread Maria Liukis
Thanks for pointing out the parameters for ignore_errors and an onerror callback function. I have been running this code for more than an year, and this is the very first time I see the problem. We switched to the NFS mounted storage though, but there is nothing unusual logged by the system

Re: shutil.rmtree raises "OSError: [Errno 39] Directory not empty" exception

2009-07-10 Thread Tim Chase
shutil.rmtree(filename) File "/usr/lib64/python2.5/shutil.py", line 178, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/usr/lib64/python2.5/shutil.py", line 176, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: /path/to/my/dir According to the docum

shutil.rmtree raises "OSError: [Errno 39] Directory not empty" exception

2009-07-10 Thread Maria Liukis
Hello, Has anybody seen an exception "OSError: [Errno 39] Directory not empty" raised by shutil.rmtree? The code that raised an exception creates a lot of directories with files, and then removes them. I got an exception when one of such directories was removed. Here is the backtrace: