Google Admin Directory SDK中的users watch函数,参数投影错误突然抛出异常
The users watch function in Google Admin Directory SDK, suddenly throws exception for wrong argument projection
我在 GCP 上有一个运行超过 18 个月的云函数。一周前突然停止工作。
代码
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()
异常:
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"
我不知道是什么导致了这个问题。我已经检查了 documentation,它清楚地表明存在 projection
参数。
还有其他人遇到过这个问题吗?有什么建议吗?
我在 GCP 上有一个运行超过 18 个月的云函数。一周前突然停止工作。
代码
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()
异常:
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"
我不知道是什么导致了这个问题。我已经检查了 documentation,它清楚地表明存在 projection
参数。
还有其他人遇到过这个问题吗?有什么建议吗?