Closed
Bug 984899
Opened 11 years ago
Closed 11 years ago
[traceback] TypeError: <class 'mkt.constants.carriers.VIMPELCOM'> is not JSON serializable
Categories
(Marketplace Graveyard :: API, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
2014-03-25
People
(Reporter: mat, Assigned: mat)
References
Details
Sending an OPTIONS request to rocketfuel fails for some reason.
http://sentry.dmz.phx1.mozilla.com/addons/marketplace-dev/group/18538/
STR:
curl -X OPTIONS https://marketplace-dev.allizom.org/api/v1/rocketfuel/collections/345/?_user=<shared-secret> -i
Expected:
200 OK response with some info
Actual:
500 Internal Server Error.
Assignee | ||
Comment 1•11 years ago
|
||
TypeError: <class 'mkt.constants.carriers.VIMPELCOM'> is not JSON serializable
Stacktrace (most recent call last):
File "django/core/handlers/base.py", line 136, in get_response
response = response.render()
File "django/template/response.py", line 104, in render
self._set_content(self.rendered_content)
File "rest_framework/response.py", line 59, in rendered_content
ret = renderer.render(self.data, media_type, context)
File "mkt/api/renderers.py", line 30, in render
ensure_ascii=self.ensure_ascii, separators=(',', ':'))
File "json/__init__.py", line 237, in dumps
**kw).encode(obj)
File "json/encoder.py", line 367, in encode
chunks = list(self.iterencode(o))
File "json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 306, in _iterencode
for chunk in self._iterencode_list(o, markers):
File "json/encoder.py", line 204, in _iterencode_list
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "json/encoder.py", line 317, in _iterencode
for chunk in self._iterencode_default(o, markers):
File "json/encoder.py", line 323, in _iterencode_default
newobj = self.default(o)
File "rest_framework/utils/encoders.py", line 54, in default
return super(JSONEncoder, self).default(o)
File "json/encoder.py", line 344, in default
raise TypeError(repr(o) + " is not JSON serializable")
We shouldn't need to serialize carrier stuff to json when answering OPTIONS I wonder what's going on. Could be more important than it looks like and might not happen only with rocketfuel.
Priority: P3 → P2
Assignee | ||
Comment 2•11 years ago
|
||
https://github.com/diox/zamboni/commit/b6bd32d7b3909cbbf4f6fded1bf77e1e665e049b
STR:
- Go to the curation tool, make you you can still change region/carrier for a collection.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2014-03-25
Comment 3•11 years ago
|
||
After changing the region of a collection, the collection is correctly seen in the selected region, but the region is not updated in edit collection page : http://screencast.com/t/pxCZS9sb
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 4•11 years ago
|
||
Victor: If you reload the edit page after you went back to it, the change should appear correctly, so the API bug we were having before is fixed, what you are seeing is a different issue. I filed bug 987651 for it.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 5•11 years ago
|
||
In this case , I will mark the bug as verified, and I will follow the other bug.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•