JSON serializable issue

44 views
Skip to first unread message

lvilla1000

unread,
Jul 5, 2018, 2:11:37 PM7/5/18
to Django users
Hi,
I am working in a platform to optimize models (Cloud Copasi) wrote in Django. I put it on AWS and it look that work well. It use HTCondor and Bosco to handle clouds. However i can pass from one subtask to another. I get the Bug "DataError('value too long for type character varying(80)\n',) is not JSON serializable" and i think that is an error about writing on the db (postgres), specific, writting in the session table. However i am not sure about it and i cannt find where to looking for. I am sending an attachment with the bug. I have many days with it.
Thanks for any idea.
Luis Vargas
TypeError at _my_account_pools_add_ec2_.html

Melvyn Sopacua

unread,
Jul 7, 2018, 5:32:42 AM7/7/18
to django...@googlegroups.com
Hi,

> However i am not
> sure about it and i cannt find where to looking for. I am sending an
> attachment with the bug. I have many days with it.
> Thanks for any idea.


This looks like you're trying to store an exception in a session, using the
JSON session backend. Since json doesn't know how to serialize an exception
object, it bails out.

The underlying problem is that you're trying to store more then 80 chars into
a field with max lenght 80. Without code, it is impossible to tell how the two
relate.

--
Melvyn Sopacua

Luis

unread,
Jul 7, 2018, 5:03:58 PM7/7/18
to django...@googlegroups.com, m.r.s...@gmail.com
Dear Melvyn,
I had a week with this issue. Thanks to you i could to find the problem. I am working with AWS and it change some names for its instances (+3 or 4 letters). Then it couldnt write to the database. Before, i thinked in this solution but i was not sure and went for other solution. I change the length of the column and into the code. It is working very well.
Thanks,
Luis





--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/Td7D655GLKI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6363934.dWIXy7cGKv%40fritzbook.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages