Hi, i discovered a bug, but don't have enoght time to solve this.

The problem is this, i'm using psycopg2==2.5.2 to get this working, because 
pg8000 still in web2py distribution does not work.

I defined a field of type 'json', (postgresql supports it), when web2py 
inflates the json field as a dict, thats good, but if i do change the json 
field, and i do a row.update_record() it fails as follows, becuse DAL is 
not able to deflate the field as json, a work arround i used is to set the 
field using row[field] = gluon.contrib.simplejson.dumps(dict) and it works, 
but is really annoying if i do change any other field in this way 
row[any_field] = 'some data', and the call the row.update_record() it fails 
becuase the same problem with the json field.


Thank you,


File "applications/pyforms/modules/pyform_forms.py", line 339, in 
_edit_grid_data
    if row.update_record():
  File "/home/sebas/dev/orfeo_pyforms/web2py/gluon/dal.py", line 10640, in 
__call__
    table._db(table._id==id,ignore_common_filters=True).update(**newfields)
  File "/home/sebas/dev/orfeo_pyforms/web2py/gluon/dal.py", line 10549, in 
update
    ret = db._adapter.update("%s" % table._tablename,self.query,fields)
  File "/home/sebas/dev/orfeo_pyforms/web2py/gluon/dal.py", line 1620, in update
    raise e
DataError: invalid input syntax for type json
LINE 1: ...topografica=NULL,reviso=NULL,estructura_ecologica='{u''1'': ...


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to