Well, I found a solution to some of these problems. Perhaps this new
solution, combined with the sleeping to allow
virus-checker,file-indexer,etc. will fix the problem.
I opened a file with shelve, and when adding a particular entry found
it to be corrupt. On Windows, shelve uses bsddb.hashopen.
I tried something not exactly like this, but in the same spirit. I
don't generally have a list of files I want to delete - just one. I
try to delete it and if I get errno 13 I sleep for a little while (0.2)
and then try again. If the same problem then I add 1 sec to the sleep
time and try again.
> File attributes may be an issue to. Take look at the recipe at:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343
> which ensures the file attributes are normal before you delete it.
I don't think file attributes are an issue, because generally I can
manually delete the file in
Tim Peters wrote:
> In that case, anything that burns some time and tries again
> will work better. Replacing gc.collect() with time.sleep() is
> an easy way to test that hypothesis; because gc.collect()
> does an all-generations collection, it can consume measurable time.
An slight enhancemen
File attributes may be an issue to. Take look at the recipe at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343
which ensures the file attributes are normal before you delete it.
john
--
http://mail.python.org/mailman/listinfo/python-list
Alec Wysoker wrote:
>>>Using Python 2.3.5 on Windows XP, I occasionally get OSError: [Errno
>>>13] Permission denied when calling os.remove(). This can occur with a
>>>file that is not used by any other process on the machine,
>>
>>How do you know that?
>
>
> Yeah, good point. I don't really kn
On 2006-01-05, Alec Wysoker <[EMAIL PROTECTED]> wrote:
>>> Using Python 2.3.5 on Windows XP, I occasionally get OSError: [Errno
>>> 13] Permission denied when calling os.remove(). This can occur with a
>>> file that is not used by any other process on the machine,
>>
>> How do you know that?
>
> Y
>> Using Python 2.3.5 on Windows XP, I occasionally get OSError: [Errno
>> 13] Permission denied when calling os.remove(). This can occur with a
>> file that is not used by any other process on the machine,
>
> How do you know that?
Yeah, good point. I don't really know. I should have said no p
Interesting theory. I do have a virus scanner, and also Google Desktop
Search. Sometimes I get this error when running a large suite of unit
tests. Each unit test starts off by cleaning the test output
directory, and failing if it can't do so. I will see many (hundreds?)
tests fail because the
Alec Wysoker wrote:
> Using Python 2.3.5 on Windows XP, I occasionally get OSError:
> [Errno 13] Permission denied when calling os.remove(). This can
> occur with a file that is not used by any other process on the
> machine, and is created by the python.exe invocation that is
> trying to delete
[Alec Wysoker]
> Using Python 2.3.5 on Windows XP, I occasionally get OSError: [Errno
> 13] Permission denied when calling os.remove(). This can occur with a
> file that is not used by any other process on the machine,
How do you know that?
> and is created by the python.exe invocation that is t
11 matches
Mail list logo