亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Google Admin Directory SDK 中的用戶監視功能突然因參數投影錯誤而引發異常

Google Admin Directory SDK 中的用戶監視功能突然因參數投影錯誤而引發異常

慕婉清6462132 2023-07-05 15:50:35
我在 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"我不知道是什么導致了這個問題。我檢查了文檔,它清楚地表明了該projection論點的存在。還有其他人遇到這個問題嗎?有什么建議么?
查看完整描述

1 回答

?
守候你守候我

TA貢獻1802條經驗 獲得超10個贊

以下內容解決了我的問題:我已從我的請求中刪除了projection、maxResultsviewType參數,并且一切正常。

對問題發生原因的一些解釋。googleapiclient.discovery 基于提供給它的 JSON 構建 API。似乎 Google 更改了返回的 JSON,卻沒有向任何人透露這些制動更改。

我希望它對其他人有幫助。


查看完整回答
反對 回復 2023-07-05
  • 1 回答
  • 0 關注
  • 100 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號