Re: [web2py] Re: error when upgraded to v1.99
data = { 'name': users.get_current_user().nickname(), 'user': users.get_current_user(), 'email': users.get_current_user().email(), 'active': True, 'role_worker': True, 'role_facilitator': True, 'role_admin': True, } On Sat, Nov 5, 2011 at 11:38 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: The error is here File /web2py/helpdesk/applications/helpdesk/models/ dbowrappers.py, line 226, in create_admin id = cls.db.user_profile.insert(**data) what's in data? for key in data: print ket, repr(data[key]), type(data[key]) On Nov 4, 11:00 pm, Richard Baron Penman richar...@gmail.com wrote: Yes the app uses a customized auth. That user field stores google accounts: from google.appengine.api import users google_user = users.get_current_user() The error is raised from GAE but doesn't happen when I use the same version of GAE with an older version of web2py. Do you know what might have changed in web2py to break it? Richard On Sat, Nov 5, 2011 at 12:41 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This is not a web2py error. You are declaring Field('user', gae.UserProperty()), what are you putting into this field? You seem to be re-implementing a lot of the auth logic yourself. On Nov 3, 10:07 pm, Richard Baron Penman richar...@gmail.com wrote: from trunk, now a different error: Traceback (most recent call last): File /web2py/helpdesk/gluon/restricted.py, line 204, in restricted exec ccode in environment File /web2py/helpdesk/applications/helpdesk/controllers/default.py:index, line 11, in module File applications/helpdesk/modules/auth.py, line 109, in __call__ user_profile = UserProfile.get_or_create_from_session() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 234, in get_or_create_from_session return cls.from_session() or cls.create_admin() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 226, in create_admin id = cls.db.user_profile.insert(**data) File /web2py/helpdesk/gluon/dal.py, line 5063, in insert return self._db._adapter.insert(self,self._listify(fields)) File /web2py/helpdesk/gluon/dal.py, line 3464, in insert tmp = table._tableobj(**dfields) File /google_appengine/google/appengine/ext/db/__init__.py, line 945, in __init__ prop.__set__(self, value) File /google_appengine/google/appengine/ext/db/__init__.py, line 599, in __set__ value = self.validate(value) File /google_appengine/google/appengine/ext/db/__init__.py, line 3269, in validate raise BadValueError('Property %s must be a User' % self.name) BadValueError: Property user must be a User On Fri, Nov 4, 2011 at 10:14 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Try the latest trunk. On Nov 3, 6:53 pm, Plumo richar...@gmail.com wrote: db.define_table('user_profile', Field('name'), Field('user', gae.UserProperty()), Field('email'), Field('active', 'boolean'), Field('role_worker', 'boolean'), Field('role_facilitator', 'boolean'), Field('role_admin', 'boolean'), )
Re: [web2py] Re: error when upgraded to v1.99
Yes the app uses a customized auth. That user field stores google accounts: from google.appengine.api import users google_user = users.get_current_user() The error is raised from GAE but doesn't happen when I use the same version of GAE with an older version of web2py. Do you know what might have changed in web2py to break it? Richard On Sat, Nov 5, 2011 at 12:41 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This is not a web2py error. You are declaring Field('user', gae.UserProperty()), what are you putting into this field? You seem to be re-implementing a lot of the auth logic yourself. On Nov 3, 10:07 pm, Richard Baron Penman richar...@gmail.com wrote: from trunk, now a different error: Traceback (most recent call last): File /web2py/helpdesk/gluon/restricted.py, line 204, in restricted exec ccode in environment File /web2py/helpdesk/applications/helpdesk/controllers/default.py:index, line 11, in module File applications/helpdesk/modules/auth.py, line 109, in __call__ user_profile = UserProfile.get_or_create_from_session() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 234, in get_or_create_from_session return cls.from_session() or cls.create_admin() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 226, in create_admin id = cls.db.user_profile.insert(**data) File /web2py/helpdesk/gluon/dal.py, line 5063, in insert return self._db._adapter.insert(self,self._listify(fields)) File /web2py/helpdesk/gluon/dal.py, line 3464, in insert tmp = table._tableobj(**dfields) File /google_appengine/google/appengine/ext/db/__init__.py, line 945, in __init__ prop.__set__(self, value) File /google_appengine/google/appengine/ext/db/__init__.py, line 599, in __set__ value = self.validate(value) File /google_appengine/google/appengine/ext/db/__init__.py, line 3269, in validate raise BadValueError('Property %s must be a User' % self.name) BadValueError: Property user must be a User On Fri, Nov 4, 2011 at 10:14 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Try the latest trunk. On Nov 3, 6:53 pm, Plumo richar...@gmail.com wrote: db.define_table('user_profile', Field('name'), Field('user', gae.UserProperty()), Field('email'), Field('active', 'boolean'), Field('role_worker', 'boolean'), Field('role_facilitator', 'boolean'), Field('role_admin', 'boolean'), )
Re: [web2py] Re: error when upgraded to v1.99
from trunk, now a different error: Traceback (most recent call last): File /web2py/helpdesk/gluon/restricted.py, line 204, in restricted exec ccode in environment File /web2py/helpdesk/applications/helpdesk/controllers/default.py:index, line 11, in module File applications/helpdesk/modules/auth.py, line 109, in __call__ user_profile = UserProfile.get_or_create_from_session() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 234, in get_or_create_from_session return cls.from_session() or cls.create_admin() File /web2py/helpdesk/applications/helpdesk/models/dbowrappers.py, line 226, in create_admin id = cls.db.user_profile.insert(**data) File /web2py/helpdesk/gluon/dal.py, line 5063, in insert return self._db._adapter.insert(self,self._listify(fields)) File /web2py/helpdesk/gluon/dal.py, line 3464, in insert tmp = table._tableobj(**dfields) File /google_appengine/google/appengine/ext/db/__init__.py, line 945, in __init__ prop.__set__(self, value) File /google_appengine/google/appengine/ext/db/__init__.py, line 599, in __set__ value = self.validate(value) File /google_appengine/google/appengine/ext/db/__init__.py, line 3269, in validate raise BadValueError('Property %s must be a User' % self.name) BadValueError: Property user must be a User On Fri, Nov 4, 2011 at 10:14 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Try the latest trunk. On Nov 3, 6:53 pm, Plumo richar...@gmail.com wrote: db.define_table('user_profile', Field('name'), Field('user', gae.UserProperty()), Field('email'), Field('active', 'boolean'), Field('role_worker', 'boolean'), Field('role_facilitator', 'boolean'), Field('role_admin', 'boolean'), )