The issue may have been a version compatibility issue of google-api-python-client library with other libraries like - google-auth - google-auth-httplib2 - google-auth-oauthlib You just need to make sure that the version of your google-api-python-client supports the versions you have installed to its dependency libraries. You can view the full change log of google-api-python-client library here References: google-api-python-client change log https://googleapis.github.io/google-api-python-client/docs/auth.html https://googleapis.github.io/google-api-python-client/docs/oauth.html google-api-python-client google_auth_oauthlib.flow module Github post similar issue

Context: Stack Overflow question (score 21, has accepted answer): I wrote a Python script(Google_add.py) which creates users in the Google Workspace. However, When it is run, an AttributeError occurred. How do I resolve this Error? ・Google_add.py (Excerpt） ``` PATH = '/opt/Google/credentials.json' CLIENT_SECRETS [your value] credentials [your value] #If there are credentials if os.path.exists(PATH): credentials [your value] path = PATH, scopes = SCOPES) #If there are no (valid) credentials available if not credentials or not credentials.valid: if credentials and credentials.expired and credentials.refresh_token - credentials.refresh(Request()) else: FLOW = flow.InstalledAppFlow.from_client_secrets_file( client_secrets_file [your value] scopes = SCOPES