Skip to content

Instantly share code, notes, and snippets.

@alsoicode
Created October 8, 2013 14:17
Show Gist options
  • Save alsoicode/6885415 to your computer and use it in GitHub Desktop.
Save alsoicode/6885415 to your computer and use it in GitHub Desktop.
TastyPie POST error
{"error_message": "The format indicated 'application/x-www-form-urlencoded' had no available deserialization method. Please check your ``formats`` and ``content_types`` on your Serializer.", "traceback": "Traceback (most recent call last):\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/resources.py\", line 195, in wrapper\n response = callback(request, *args, **kwargs)\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/resources.py\", line 426, in dispatch_list\n return self.dispatch('list', request, **kwargs)\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/resources.py\", line 458, in dispatch\n response = method(request, **kwargs)\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/resources.py\", line 1317, in post_list\n deserialized = self.deserialize(request, request.body, format=request.META.get('CONTENT_TYPE', 'application/json'))\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/resources.py\", line 375, in deserialize\n deserialized = self._meta.serializer.deserialize(data, format=request.META.get('CONTENT_TYPE', 'application/json'))\n\n File \"/home/btaylor/python_virtualenvs/b2c/local/lib/python2.7/site-packages/tastypie/serializers.py\", line 218, in deserialize\n raise UnsupportedFormat(\"The format indicated '%s' had no available deserialization method. Please check your ``formats`` and ``content_types`` on your Serializer.\" % format)\n\nUnsupportedFormat: The format indicated 'application/x-www-form-urlencoded' had no available deserialization method. Please check your ``formats`` and ``content_types`` on your Serializer.\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment