-
Notifications
You must be signed in to change notification settings - Fork 76
Home
lucjon edited this page Sep 14, 2010
·
28 revisions
Welcome to the Py-StackExchange wiki!
- Fix/investigate this bug
- Implement search and post revisions
-
Look at adding support for gzip-compressed responsesdone.
Before checking here, I’d suggest updating to the latest version of the library, either through a git pull
or downloading a ZIP or tarball and extracting it over the existing files – bugs are being fixed all the time.
-
Why do I get an empty list on
user.answers
oruser.questions
orbadge.recipients
etc.?
To reduce the number of API calls the library makes, collections which would require another request to populate require explicit ‘fetching’ of the data, with, for exampleuser.answers.fetch()
. This will return the list with the new items, and also update the property on the original object. -
Why do I get a
ValueError: No JSON object could be decoded
message?
This is probably the result of some proxy/router mangling with request headers. It could be that your router/proxy adds headers requesting gzip data, but doesn’t decompress it, and that you are running a slightly old version of the code which does not deal with gzip compression. In this case, just update to the latest version of the library.
Otherwise, please send me a stack trace and any other details you have through StackApps – just submit an answer. -
Why do I get a ‘not a gzip file’ or similar error?
Something could be disposing of, or decompressing, the gzip headers or data respectively. In this case, before making your first request, usesite.use_gzip = False
.
If this doesn’t solve the problem, send me a bug report through StackApps (see previous question). -
fetch_next()
returns an empty tuple where it shouldn’t. Sometimes it works if the code is moved somewhere else.
I’m not exactly sure what’s going on here, but try rearranging your code if your problem matches this description.
Otherwise, send me a bug report through StackApps.