You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'fixed pickle raw' commit : b9277a4, break the db queries of type db(db.TableName.field == value) . While db(db.TableName.id == request.vars.id) is broken, the equivalent db.TableName(request.vars.id) is still fine trough. However there is not always an existing equivalent; for instance for select on non id fields or when the render() function is used afterwards.
Following an example of errors I get :
File "/opt/apps/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/opt/apps/web2py/applications/.../controllers/controllername.py", line 206, in
File "/opt/apps/web2py/gluon/globals.py", line 430, in
self._caller = lambda f: f()
File "/opt/apps/web2py/applications/.../controllers/default.py", line 159, in ...
current_object = db(db.TableName.id == request.vars.id).select().render(0,fields=[db.TableName.field])
File "/opt/apps/web2py/gluon/packages/dal/pydal/objects.py", line 3571, in render
row[field._tablename][field.name],
File "/opt/apps/web2py/gluon/packages/dal/pydal/objects.py", line 146, in getitem
raise KeyError(key)
KeyError: 'TableName'
The only solution I have at the moment is to roll back to the previous commit , namely : 7237a87
The text was updated successfully, but these errors were encountered:
jvanbraekel
changed the title
The 'fix pickkle raw' break db.tableName usage
The 'fix pickle raw' break db.tableName usage
Aug 6, 2021
jvanbraekel
changed the title
The 'fix pickle raw' break db.tableName usage
The 'fixed pickle raw' break db.tableName usage
Aug 6, 2021
Hello,
The 'fixed pickle raw' commit : b9277a4, break the db queries of type db(db.TableName.field == value) . While db(db.TableName.id == request.vars.id) is broken, the equivalent db.TableName(request.vars.id) is still fine trough. However there is not always an existing equivalent; for instance for select on non id fields or when the render() function is used afterwards.
Following an example of errors I get :
File "/opt/apps/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/opt/apps/web2py/applications/.../controllers/controllername.py", line 206, in
File "/opt/apps/web2py/gluon/globals.py", line 430, in
self._caller = lambda f: f()
File "/opt/apps/web2py/applications/.../controllers/default.py", line 159, in ...
current_object = db(db.TableName.id == request.vars.id).select().render(0,fields=[db.TableName.field])
File "/opt/apps/web2py/gluon/packages/dal/pydal/objects.py", line 3571, in render
row[field._tablename][field.name],
File "/opt/apps/web2py/gluon/packages/dal/pydal/objects.py", line 146, in getitem
raise KeyError(key)
KeyError: 'TableName'
The only solution I have at the moment is to roll back to the previous commit , namely : 7237a87
The text was updated successfully, but these errors were encountered: