I have a cloud function on GCP which runs for more than 18 months. Suddenly a week ago it stopped working.
The code
import googleapiclient.discovery
adminDirectoryService = googleapiclient.discovery.build('admin', 'directory_v1', credentials = gsuiteCredentials, cache_discovery=False)
result = adminDirectoryService.users().watch(body=watchBody, projection=projection, event=eventType, maxResults=1, customer=gSuiteCutomerId, viewType=viewType).execute()
The exception:
result = adminDirectoryService.users().watch(body=watchBody, projection=projection, event=eventType, maxResults=1, customer=gSuiteCutomerId, viewType=viewType).execute()
File "/env/lib/python3.7/site-packages/google_api_python_client-1.7.8-py3.7.egg/googleapiclient/discovery.py", line 723, in method
raise TypeError('Got an unexpected keyword argument "%s"' % name)
TypeError: Got an unexpected keyword argument "projection"
I have no idea what is causing the issue. I have checked the documentation and it clearly states the projection
argument exists.
Does anyone else encounter the issue? Any suggestions?