ah, i see that web2py is not using the latest version of portalocker. ok, so line 122 of portalocker is "self.file.truncate()" so you don't have permission to truncate a file. And apparently the file does is not being opened in append mode...
so what file? hmm, judging from the trace, it's going to be a database .table file. so check permissions on the database .table files... also i noticed that web2py and portalocker are interacting strangely. opening a file in 'w' mode will already do the seek(0) and truncate. Why portalocker does it again is pointless to me.... On Monday, September 8, 2014 1:51:06 PM UTC-7, JorgeH wrote: > > windows 7 32 bit > > Thanks for your answer > > Any help is very appreciated. > > On Monday, September 8, 2014 3:48:10 PM UTC-5, Derek wrote: >> >> just out of curiosity, what version of windows? >> >> Here's the possible values for os.name... >> >> 'posix', 'nt', 'os2', 'ce', 'java', 'riscos' >> >> so it looks like 'ce' or 'posix' could be returned... >> >> Is it Windows CE? >> >> On Monday, September 8, 2014 1:45:17 PM UTC-7, Derek wrote: >>> >>> Line 122 is for posix_lock, and that should not be occurring because you >>> are on windows. That's very strange. >>> For some reason os.name must be returning something other than 'nt'. >>> >>> On Monday, September 8, 2014 11:05:51 AM UTC-7, JorgeH wrote: >>>> >>>> >>>> It happens on version 2.9.9 too >>>> >>>> Version web2py™ Version 2.9.9-stable+timestamp.2014.09.08.13.16.54 >>>> Python Python 2.7.6: C:\web2py\web2py.exe (prefix: C:\Python27) >>>> Traceback >>>> >>>> 1. >>>> 2. >>>> 3. >>>> 4. >>>> 5. >>>> 6. >>>> 7. >>>> 8. >>>> 9. >>>> 10. >>>> 11. >>>> 12. >>>> 13. >>>> >>>> Traceback (most recent call last): >>>> File "gluon/restricted.py", line 221, in restricted >>>> File "C:/web2py/applications/ZenuToolkit/models/zenu.py" >>>> <http://127.0.0.1:8000/admin/default/edit/ZenuToolkit/models/zenu.py>, >>>> line 144, in <module> >>>> db.agua.fuente.requires=IS_IN_SET(["Acueducto", "Subterranea", >>>> "Superficial", "Lluvia"], multiple = True) >>>> File "gluon/dal.py", line 8494, in __getattr__ >>>> File "gluon/dal.py", line 8426, in lazy_define_table >>>> File "gluon/dal.py", line 1134, in create_table >>>> File "gluon/dal.py", line 1258, in migrate_table >>>> File "gluon/dal.py", line 1266, in save_dbt >>>> File "gluon/dal.py", line 799, in file_open >>>> File "gluon/portalocker.py", line 122, in __init__ >>>> IOError: [Errno 13] Permission denied >>>> >>>> Error snapshot [image: help] >>>> <http://127.0.0.1:8000/admin/default/ticket/ZenuToolkit/127.0.0.1.2014-09-08.12-38-00.cb3ba6b3-ca77-4d6e-93da-ee0c80f653db#> >>>> >>>> >>>> <type 'exceptions.IOError'>([Errno 13] Permission denied) >>>> >>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

