Thanks for that Massimo.
Using lazy tables seems to be the cause (although it did work with prior 
versions). Switching to lazy_tables=False under GAE fixes the problem. My 
code now looks as follows:

# -*- coding: utf-8 -*-

#########################################################################
## This scaffolding model makes your app work on Google App Engine too
## File is released under public domain and you can use without limitations
#########################################################################

## if SSL/HTTPS is properly configured and you want all HTTP requests to
## be redirected to HTTPS, uncomment the line below:
# request.requires_https()

if not request.env.web2py_runtime_gae:
    ## if NOT running on Google App Engine use SQLite or other DB
    db = DAL('sqlite://storage.sqlite', lazy_tables=True)
else:
    ## connect to Google BigTable (optional 'google:datastore://namespace')
    db = DAL('google:datastore', lazy_tables=False)
    ## store session in Memcache, Redis, etc.
    from gluon.contrib.memdb import MEMDB
    from google.appengine.api.memcache import Client
    session.connect(request, response, db = MEMDB(Client()))
    ## use memcache - from 
http://web2py.com/books/default/chapter/29/13?search=cache#Memcache
    from gluon.contrib.gae_memcache import MemcacheClient
    cache.memcache = MemcacheClient(request)
    cache.ram = cache.disk = cache.memcache

On Thursday, October 3, 2013 5:16:02 PM UTC+4, Massimo Di Pierro wrote:
>
> Something is resetting auth.settings.table_user. Do you have that your 
> code. Do you use lazy tables?
>
> On Wednesday, 2 October 2013 23:06:09 UTC-5, Andy W wrote:
>>
>> Version 2.6.4
>> Upgrade seemed to go OK. Soon after the upgrade I added 
>> auth.settings.extra_fields in db.py to add an extra field to the user. This 
>> seemed to trigger the login error, and removing that extra field has not 
>> resolved the problem.
>>
>> On Thursday, October 3, 2013 3:18:12 AM UTC+4, Massimo Di Pierro wrote:
>>>
>>> Which web2py version? Was this on upgrade of what triggered the problem?
>>>
>>> On Tuesday, 1 October 2013 23:48:18 UTC-5, Andy W wrote:
>>>>
>>>> My application works fine locally with rocket/SQLlite but on GAE it now 
>>>> fails when a user logs in.
>>>> It was working previously. The problem appeared when I added an extra 
>>>> field to auth_user. I have now removed this field but the error remains.
>>>> I do not understand the error log sufficient to know where to start - 
>>>> any suggestions?
>>>>
>>>> ERROR    2013-10-02 04:33:36,354 restricted.py:166] Traceback (most 
>>>>> recent call last):
>>>>>
>>>>>   File "/Users/andy/www/web2py/gluon/restricted.py", line 217, in 
>>>>> restricted
>>>>>
>>>>>     exec ccode in environment
>>>>>
>>>>>   File 
>>>>> "/Users/andy/www/web2py/applications/nurserymgr/controllers/default.py", 
>>>>> line 75, in <module>
>>>>>
>>>>>   File "/Users/andy/www/web2py/gluon/globals.py", line 371, in <lambda>
>>>>>
>>>>>     self._caller = lambda f: f()
>>>>>
>>>>>   File 
>>>>> "/Users/andy/www/web2py/applications/nurserymgr/controllers/default.py", 
>>>>> line 37, in user
>>>>>
>>>>>     return dict(form=auth())
>>>>>
>>>>>   File "/Users/andy/www/web2py/gluon/tools.py", line 1297, in __call__
>>>>>
>>>>>     return getattr(self, args[0])()
>>>>>
>>>>>   File "/Users/andy/www/web2py/gluon/tools.py", line 2364, in login
>>>>>
>>>>>     self.login_user(user)
>>>>>
>>>>>   File "/Users/andy/www/web2py/gluon/tools.py", line 1973, in 
>>>>> login_user
>>>>>
>>>>>     user = Row(self.settings.table_user._filter_fields(user, id=True))
>>>>>
>>>>> AttributeError: 'NoneType' object has no attribute '_filter_fields'
>>>>>
>>>>

-- 
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/groups/opt_out.

Reply via email to