Note that there are some explanatory texts on larger screens.

plurals
  1. POFlaky file deletion under Windows 7?
    primarykey
    data
    text
    <p>I have a Python test suite that creates and deletes many temporary files. Under Windows 7, the shutil.rmtree operations sometimes fail (&lt;1% of the time). The failure is apparently random, not always on the same files, not always in the same way, but it's always on rmtree operations. It seems to be some kind of timing issue. It is also reminiscent of Windows 7's increased vigilance about permissions and administrator rights, but there are no permission issues here (since the code had just created the files), and there are no administrator rights in the mix.</p> <p>It also looks like a timing issue between two threads or processes, but there is no concurrency here either.</p> <p>Two examples of (partial) stack traces:</p> <pre><code> File "C:\ned\coverage\trunk\test\test_farm.py", line 298, in clean shutil.rmtree(cleandir) File "c:\python23\lib\shutil.py", line 142, in rmtree raise exc[0], (exc[1][0], exc[1][1] + ' removing '+arg) WindowsError: [Errno 5] Access is denied removing xml_1 File "C:\ned\coverage\trunk\test\test_farm.py", line 298, in clean shutil.rmtree(cleandir) File "c:\python23\lib\shutil.py", line 142, in rmtree raise exc[0], (exc[1][0], exc[1][1] + ' removing '+arg) WindowsError: [Errno 3] The system cannot find the path specified removing out </code></pre> <p>On Windows XP, it never failed. On Windows 7, it fails like this, across a few different Python versions (2.3-2.6, not sure about 3.1).</p> <p>Anyone seen anything like this and have a solution? The code itself is on <a href="http://bitbucket.org/ned/coveragepy/src/tip/test/test_farm.py" rel="nofollow noreferrer">bitbucket</a> for the truly industrious.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload