Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in converting googleapiclient.errors.HttpError to string #99

Closed
scribu opened this issue May 22, 2015 · 2 comments
Closed

Error in converting googleapiclient.errors.HttpError to string #99

scribu opened this issue May 22, 2015 · 2 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@scribu
Copy link

scribu commented May 22, 2015

try:
    results = ga.core.query.get()
except googleapiclient.errors.HttpError as err:
    print(err)  # TypeError: the JSON object must be str, not 'bytes'

    print(json.loads(err.content.decode('utf-8'))['error']['message'])  # works

Environment:

  • Python 3.4.3
  • google-api-python-client==1.4.0
  • httplib2==0.9.1
  • oauth2client==1.4.7
  • six==1.9.0
  • uritemplate==0.6
@lancechentw
Copy link

Looks like 0915761 fixed this issue. When is the next release coming out?

@scribu
Copy link
Author

scribu commented Jul 8, 2015

It looks like 1.4.1 contains the fix.

@scribu scribu closed this as completed Jul 8, 2015
akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants