Oh now I understand my instance wasn't using my javascript at all. I'm back
on track.


On Wed, Mar 19, 2014 at 6:44 PM, Joe Blaylock <jrbl@stanford.edu> wrote:

> Try as I might, I haven't been able to reproduce your stack trace, Will. I
> consistently get back a properly json-serialized object; it just happens to
> have the wrong data in it.
>
>
> On Wed, Mar 19, 2014 at 4:41 AM, Will Daly <notifications@github.com>wrote:
>
>> In apps/openassessment/xblock/static/js/src/oa_server.js:
>>
>> >          return $.Deferred(function(defer) {
>> > -            $.ajax({ type: "POST", url: url, data: payload }).done(
>> > +            $.ajax({ type: "POST", url: url, data: feedback_dict }).done(
>>
>> You're sending the data as POST parameters, but the XBlock handler is
>> expecting JSON.
>>
>> When I try to submit feedback, I see this stack trace in the console:
>>
>> Traceback (most recent call last):
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
>>     return self.application(environ, start_response)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
>>     return self.application(environ, start_response)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
>>     response = self.get_response(request)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response
>>     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/core/handlers/base.py", line 221, in handle_uncaught_exception
>>     return debug.technical_500_response(request, *exc_info)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django_extensions/management/technical_response.py", line 5, in null_technical_500_response
>>     six.reraise(exc_type, exc_value, tb)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
>>     response = callback(request, *callback_args, **callback_kwargs)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/workbench/views.py", line 114, in handler
>>     result = block.runtime.handle(block, handler_slug, request, suffix)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/xblock/runtime.py", line 643, in handle
>>     results = handler(request, suffix)
>>   File "/Users/will/.virtualenvs/tim/lib/python2.7/site-packages/xblock/core.py", line 114, in wrapper
>>     request_json = json.loads(request.body)
>>   File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
>>     return _default_decoder.decode(s)
>>   File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
>>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>>   File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
>>     raise ValueError("No JSON object could be decoded")
>> ValueError: No JSON object could be decoded
>>
>> —
>> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-tim/pull/167/files#r10745331>
>> .
>>
>
>