Here there is a thread on the topic:

http://code.activestate.com/lists/python-list/236518/

although it does not help much.

For debugging purporses.... if you replace


    msvcrt.locking(file.fileno(), mode, os.path.getsize(file.name))

with

    try: msvcrt.locking(file.fileno(), mode,
os.path.getsize(file.name))
    except IOError: pass

do you end up with a session permanently locked or does it fix the
problem?

Massimo

On Nov 27, 3:34 pm, "mr.freeze" <nat...@freezable.com> wrote:
> I get this occasionally on Windows 7 and Python 2.5:
>
> Traceback (most recent call last):
>   File "C:\web2py\gluon\restricted.py", line 188, in restricted
>     exec ccode in environment
>   File "C:/web2py/applications/test/models/db.py", line 66, in
> <module>
>     Field('converter')
>   File "C:\web2py\gluon\sql.py", line 1380, in define_table
>     t._create(migrate=migrate, fake_migrate=fake_migrate)
>   File "C:\web2py\gluon\sql.py", line 1856, in _create
>     portalocker.unlock(tfile)
>   File "C:\web2py\gluon\portalocker.py", line 78, in unlock
>     msvcrt.locking(file.fileno(), mode, os.path.getsize(file.name))
> IOError: [Errno 13] Permission denied
>
> I reload the page and it goes away for a while.

Reply via email to