Yes, not a bug but these are issues which come up when messing with the 
admin interface on GAE.
NOTE that the issues occur when running locally using the GAE SDK as well.

So I assume the correct approach is to run it once as a normal web2py app 
i.e. python web2py.py to get those special files
to write out.  Then subsequent dev_appserver.py runs should work...

On Monday, November 19, 2012 11:15:58 PM UTC-6, dlypka wrote:
>
> I had to work around this problem in tools.py in my web2py 1.9x code.
> Maybe this issue is still in 2.x
>
> @staticmethod
>
> def get_or_create_key(filename=None):
>
> request = current.request
>
> if not filename:
>
> filename = os.path.join(request.folder,'private','auth.key')
>
> if os.path.exists(filename):
>
> key = open(filename,'r').read().strip()
>
> else:
>
> key = web2py_uuid()
>
> *#* open(filename,'w').write(key) *# dlypka workaround - this crashes on 
> GAE, not allowing to write to a file!!*
>
> return key
>
> --------------------------------------------------
>
> Also a similar issue here: in In admin\controllers\default.py
>
> #Get crontab
>
> cronfolder = apath('%s/cron' % app, r=request)
>
> if not os.path.exists(cronfolder): os.mkdir(cronfolder)
>
> crontab = apath('%s/cron/crontab' % app, r=request)
>
> #if not os.path.exists(crontab): # dlypka patch for GAE - safe_write() 
> fails on gae
>
> #safe_write(crontab, '#crontab')
>
>
> On Monday, November 19, 2012 9:22:36 PM UTC-6, Massimo Di Pierro wrote:
>>
>> Please open a ticken about this. I will be able to look at it later 
>> tomorrow.
>>
>> On Monday, 19 November 2012 10:57:27 UTC-6, Sebastian Cambeo wrote:
>>>
>>> might it be, that "users.create_login_url(request.env.path_info)" in 
>>> "check_credentials" needs some kind of file access?
>>>
>>> Anyhow this request appears to trigger the error
>>>
>>

-- 



Reply via email to