[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread Massimo Di Pierro
Can you show us the db.Reservations definition and in particular its widgets and validators. there seems to be an invalid query in a IS_IN_DB somewhere. On Tuesday, 29 October 2013 08:28:06 UTC-5, David Manns wrote: > > I have been running my application on GAE using Python 2.7 and web2py > 2.4.

[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread David Manns
I have attached the reservations section from my model. Also the relevant section of the controller script - a number of validators are set up at run time. The failure case is the crud.update() in the middle of the function, modifying an existing reservation. There are no custom widgets involved

[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread Massimo Di Pierro
Not sure what the problem is but it it fails because of this: affl = db(db.Colleges.id.belongs(cl)) db.Reservations.Affiliation.requires = IS_EMPTY_OR(IS_IN_DB(affl, db.Colleges.id, '%(Name)s',orderby=db.Colleges.Name)) could it be affl is empty? On Tuesday, 29 October 2013 14:24:38 UTC-5, D

[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread David Manns
This validator is only used if affs is non-empty, I.e. the member has known college affiliations. Otherwise the standard validator is used, allowing any college in the table to be selected. In the failure case, affs was non-empty. So that doesn't seem to be the problem. -- Resources: - http://

[web2py] Re: GAE compatability with recent web2py versions

2013-10-29 Thread Scott Hunter
Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File > "/Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py", > line 4802, in BELONGS > raise SyntaxError("Not supported"

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread David Manns
Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 2

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread David Manns
'Belongs' was the problem. Older versions of web2py supported a limited implementation of belongs (up to 30 items in the set) on GAE datastore. Current version does not support 'belongs' on GAE datastore. I have worked around this and now have my application working again. Thanks Scott and Mass

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread Scott Hunter
This doesn't sound very "backwards compatible" to me; I couldn't find any documentation that says belongs DOESN'T work in GAE, and it clearly used to (if imperfectly). So is the bug that it USED to work, or that it doesn't work now? On Wednesday, October 30, 2013 11:53:04 AM UTC-4, David Manns

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread Massimo Di Pierro
Belongs on GAE has always been supported. The cited code in version 2.7.4 is def BELONGS(self,first,second=None): if not isinstance(second,(list, tuple)): raise SyntaxError("Not supported") ... So perhaps you are passing something to belongs which is not a list or tup

[web2py] Re: GAE compatability with recent web2py versions

2013-10-30 Thread Scott Hunter
I was passing the contents of a list:reference field On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote: > > Belongs on GAE has always been supported. The cited code in version 2.7.4 > is > > def BELONGS(self,first,second=None): > if not isinstance(second,(list, tupl

[web2py] Re: GAE compatability with recent web2py versions

2013-10-31 Thread David Manns
My case too was passing a list of values from a reference field. On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote: > > Belongs on GAE has always been supported. The cited code in version 2.7.4 > is > > def BELONGS(self,first,second=None): > if not isinstance(second

[web2py] Re: GAE compatability with recent web2py versions

2013-10-31 Thread Massimo Di Pierro
Please open a ticket pointing this thread. We can add support for this. On Thursday, 31 October 2013 15:11:59 UTC-5, David Manns wrote: > > My case too was passing a list of values from a reference field. > > On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote: >> >> Belongs o