My application runs on GAE and has been running on 2.9.12. In conjunction 
with some application changes decided to update web2py to latest version 
2.12.3.

Runs fine in web2py test environment.

In both production and SDK GAE various pages fail. 

This failure relates to using a set in a validator:

...
banks = db(db.CoA.Type == 'Bank')

form=SQLFORM.factory(
Field('bank', 'reference CoA', requires=IS_EMPTY_OR(IS_IN_DB(banks, 
'CoA.id','%(Name)s'))),
...

In the model:


db.define_table('CoA',
Field('Type', 'string', default='Expense', requires = IS_IN_SET(['Bank', 
'Asset/Liability', 'Revenue/Expense'])),
Field('Name', 'string', unique = True),
Field('Balance', 'decimal(9,2)'), #used to maintain PayPal and Bank balances
Field('Notes', 'text'),
format='%(Name)s')
db.CoA.Name.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'CoA.Name')]

GAE SDK log error attached.

Works fine in web2py test environment, and in GAE with 2.9.12


-- 
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.
ERROR    2015-10-17 16:28:28,345 restricted.py:174] Traceback (most recent call 
last):

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\restricted.py", line 227, in restricted

    exec ccode in environment

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\applications\init\controllers/default.py", line 2415, in 
<module>

  File "C:\Users\David\Google Drive\My Documents\ocsnedb50\gluon\globals.py", 
line 412, in <lambda>

    self._caller = lambda f: f()

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\applications\init\controllers/default.py", line 1898, in 
transearch

    comment='tick to select all accruals, all other parameters are ignored'))

  File "C:\Users\David\Google Drive\My Documents\ocsnedb50\gluon\sqlhtml.py", 
line 1773, in factory

    **attributes)

  File "C:\Users\David\Google Drive\My Documents\ocsnedb50\gluon\sqlhtml.py", 
line 1261, in __init__

    inp = self.widgets.options.widget(field, default)

  File "C:\Users\David\Google Drive\My Documents\ocsnedb50\gluon\sqlhtml.py", 
line 313, in widget

    options = requires[0].options()

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\validators.py", line 2606, in _options

    options = self.other.options()

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\validators.py", line 586, in options

    self.build_set()

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\validators.py", line 572, in build_set

    records = self.dbset(table).select(*fields, **dd)

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\packages\dal\pydal\objects.py", line 2002, in select

    return adapter.select(self.query,fields,attributes)

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\packages\dal\pydal\adapters\google_adapters.py", line 
500, in select

    (items, tablename, fields) = self.select_raw(query,fields,attributes)

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\packages\dal\pydal\adapters\google_adapters.py", line 
390, in select_raw

    filters = self.expand(query)

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\packages\dal\pydal\adapters\google_adapters.py", line 
246, in expand

    return expression.op(expression.first, expression.second)

  File "C:\Users\David\Google Drive\My 
Documents\ocsnedb50\gluon\packages\dal\pydal\adapters\google_adapters.py", line 
266, in AND

    return ndb.AND(first, second)

  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\ext\ndb\query.py", line 558, in 
__new__

    ' received a non-Node instance %r' % node)

TypeError: ConjunctionNode() expects Node instances as arguments; received a 
non-Node instance None



INFO     2015-10-17 16:28:28,345 gaehandler.py:75] **** Request: 
292.00ms/294.34ms (real time/cpu time)

INFO     2015-10-17 12:28:28,352 module.py:786] default: "GET 
/init/default/transearch HTTP/1.1" 500 707

Reply via email to