what do you mean by " manually altered the type to JSON"? Anyway, please
use psycopg2 instead of pg8000.
On Tuesday, 4 July 2017 04:03:00 UTC-5, lyn2py wrote:
>
> I'm using Postgresql, with the pg8000 adapter.
>
> One of the fields I have is of 'json' type
>
> Field('json_string','json'),
>
>
> And each time I restart the web2py server, this error will show one time.
> Refreshing the page the second time makes it go away:
>
> ProgrammingError: (u'ERROR', u'ERROR', u'42804', u'column "json_string__tmp"
> is of type json but expression is of type text', u'You will need to rewrite
> or cast the expression.', u'48', u'parse_target.c', u'540',
> u'transformAssignedExpr', u'', u'')
>
>
> I checked the db itself and the schema says:
> Column = json_string
> Type = text
>
> So I did a search and manually altered the type to JSON. After restart, no
> errors! It was good.
> BUT... subsequent restarting of the server brought back the error. So I
> checked the db again and the Type is changed back to 'text' again
>
>
>
>
>
>
>
>
>
>
>
--
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.