question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

googleapiclient.errors.InvalidJsonError

See original GitHub issue

Please confirm the following:

  1. gam create user fakeusername@fakeemail.com firstname Fake lastname User password userpassword org “Fake Org Here”

Expected outcome (what are you trying to do?): Create a user in our G-Suite domain

Actual outcome (what errors or bad behavior do you see instead?):

Traceback (most recent call last):
  File "gam.py", line 10313, in <module>
  File "gam.py", line 9654, in ProcessGAMCommand
  File "gam.py", line 6369, in doCreateUser
  File "gam.py", line 728, in buildGAPIObject
  File "gam.py", line 713, in getClientAPIversionHttpService
  File "oauth2client/util.py", line 137, in positional_wrapper
  File "googleapiclient/discovery.py", line 223, in build
  File "googleapiclient/discovery.py", line 284, in _retrieve_discovery_doc
googleapiclient.errors.InvalidJsonError
Failed to execute script gam

I’ve updated to the latest version of GAM and it still doesn’t appear to be working. Here’s the machine I’m using:

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial

Not sure why GAM has suddenly stopped working.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jay0leecommented, Feb 10, 2017

Try deleting the entire gamcache folder that’s in the gam folder and see if that resolves.

0reactions
jubiluscommented, Feb 10, 2017

My apologies you are correct. I looked in the wrong directory.

That being said, I did find the correct folder and deleted the gamcache folder, and the command began working again.

Thanks for the assistance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

google-api-python-client/googleapiclient.errors.InvalidJsonError ...
The official Python client library for Google's discovery based APIs. - google-api-python-client/googleapiclient.errors.InvalidJsonError-class.html at main ...
Read more >
Bug #10669: googleapiclient.errors.InvalidJsonError retrieving ...
When logging in to a shell node, I got the error below, apparently because the cached version of the discovery document was corrupted....
Read more >
googleapiclient.errors - Google APIs
HTTP data was invalid or unexpected. InvalidJsonError. The JSON returned could not be parsed. UnknownFileType. File type unknown or unexpected.
Read more >
How to mock Google Api Discovery HttpResponseSequence
... googleapiclient.discovery: ERROR: Failed to parse as JSON: ... function _retrieve_discovery_doc in the file googleapiclient/discovery.py.
Read more >
discovery.py - Google Git
from googleapiclient.errors import HttpError. from googleapiclient.errors import InvalidJsonError. from googleapiclient.errors import MediaUploadSizeError.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found