What steps will reproduce the problem?
1. Create a write query you know will fail
2. mqlwrite(query)
3. Freebase will return a status 400 without a Request body
What is the expected output? What do you see instead?
_raise_service_error does not fail, and mqlwrite raises a MetawebError.
What version of the product are you using? On what operating system?
1.6.0
Please provide any additional information below.
Here is how I have fixed the bug in locally. See line 88 of httpclients.py.
This fix will accommodate scenarios where no body is returned, but still
properly raise the MetawebError.
if resp.status_code != 200:
try:
body = resp.body
except AttributeError:
body = ""
self._raise_service_error(url, resp.status_code,
resp.headers['content-type'], body)
Original issue reported on code.google.com by Will.Merydith on 7 Feb 2011 at 9:35
Original issue reported on code.google.com by
Will.Merydith
on 7 Feb 2011 at 9:35