Re: is not JSON serializable - again

2006-11-06 Thread timc3
Well I got it to work by what you said. Here is my example for those that might come across this thread: if errors or request.POST.has_key('preview'): response_dict = {} datetime_now = datetime.datetime.now() comment = errors and '' or

Re: is not JSON serializable - again

2006-11-06 Thread Oliver Lavery
Funny, I literally just finished debugging the same error.If you inspect the traceback you should see which dict element wouldn't serialize. Just walk up the traceback stack and inspect the locals. The bottom couple of stack frames will be within the JSON default handler (which generates the ever

Re: is not JSON serializable - again

2006-11-06 Thread timc3
I get a pop-up error saying "internal server error" - which my javascript is handling and displaying. The full error in the page returned is: Exception Type: TypeError Exception Value: t: t... is not JSON serializable Exception Location:

Re: is not JSON serializable - again

2006-11-06 Thread Rachel Willmer
What specifically does the error message say is not JSON serializable? Try setting it to be a string in the response dict... For example: if errors or request.POST.has_key('preview'): response_dict = {} # datetime_now = datetime.datetime.now()

is not JSON serializable - again

2006-11-04 Thread timc3
I am trying to send back the free comments form so I can process it with ajax, and I am getting "is not JSON serializable" all the time. I have copied post_free_comment and then I have simply done if errors or request.POST.has_key('preview'): response_dict = {}