-
Notifications
You must be signed in to change notification settings - Fork 6.7k
broken request.data.decode('utf-8') call #1965
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: appengineIssues related to the App Engine Admin API API.Issues related to the App Engine Admin API API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Activity
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: appengineIssues related to the App Engine Admin API API.Issues related to the App Engine Admin API API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
python-docs-samples/appengine/standard/pubsub/main.py
Line 71 in da0d097
As written currently, the code returns the following error message, since request.data is empty.
raise ValueError("No JSON object could be decoded")It works if written as
envelope = json.loads(request.get_data().decode('utf-8'))