Failed to execute script

258 views
Skip to first unread message

Eric Klosterman

unread,
Aug 4, 2021, 12:30:26 PM8/4/21
to GAM for Google Workspace
Any command I run gives me the error message below.  I have reinstalled GAM to version 6.07.  Also tried running through the process of creating another project to start fresh.  The copy and paste is from this process where I am getting permission for GAM to access Google management.  The bold text is the same error message portion for the command lines I run.  

After searching Google and this Google group, I am at a loss.  My GAM setup was working a month ago without any hiccups.  From my interpretation of the error messages, I am failing to get authorization but I am not sure how to remedy this.

Thinking outside the box, could I manually create an API client for permissions.

Are you ready to authorize GAM to perform Google Workspace management operations as your admin account? [y or n] y
Traceback (most recent call last):
  File "gam\__main__.py", line 50, in <module>
  File "gam\__main__.py", line 45, in main
  File "gam\__init__.py", line 11743, in ProcessGAMCommand
  File "gam\__init__.py", line 10387, in createOAuth
  File "gam\__init__.py", line 10399, in doRequestOAuth
  File "gam\__init__.py", line 908, in getOauth2TxtStorageCredentials
  File "gam\auth\__init__.py", line 41, in get_admin_credentials
  File "json\__init__.py", line 293, in load
  File "json\__init__.py", line 346, in loads
  File "json\decoder.py", line 340, in decode
json.decoder.JSONDecodeError: Extra data: line 21 column 2 (char 1938)
[7752] Failed to execute script '__main__' due to unhandled exception!

Admin authorization failed. Trying again. Say n to skip admin authorization.

Ross Scroggs

unread,
Aug 4, 2021, 12:41:14 PM8/4/21
to google-ap...@googlegroups.com
Eric,

Your oauth2.txt seems to be corrupted.
Do:
gam oauth delete
gam oauth create

Ross



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/7c3976e8-11e7-49b8-b405-89a781b38f4bn%40googlegroups.com.


--

Eric Klosterman

unread,
Aug 4, 2021, 2:24:34 PM8/4/21
to GAM for Google Workspace
Gam would not let me run the delete command.  I renamed the file and run the create command with success.  I am now able to complete gam-setup.bat and able to run other commands.  Thank You.
Reply all
Reply to author
Forward
0 new messages