Python 403,如果匹配或不匹配,则需要标题或条目etag属性

Python 403,如果匹配或不匹配,则需要标题或条目etag属性,python,gdata,google-oauth,google-spreadsheet-api,google-apps-marketplace,Python,Gdata,Google Oauth,Google Spreadsheet Api,Google Apps Marketplace,背景信息 我正在使用pythongdata电子表格api和OAuth2.0和证书凭据来访问google应用程序域中的数据 我正在尝试使用将一行插入电子表格 spreadSheetClient = SpreadsheetsClient() # Certificate Authentication .... spreadSheetClient.add_list_entry(list_entry=list_entry, spreadsheet_key=spreadSheetKey,

背景信息

我正在使用
python
gdata
电子表格api
OAuth2.0
证书凭据来访问google应用程序域中的数据

我正在尝试使用将一行插入电子表格

spreadSheetClient = SpreadsheetsClient()
# Certificate Authentication  ....
spreadSheetClient.add_list_entry(list_entry=list_entry, spreadsheet_key=spreadSheetKey,
                                                     worksheet_id=workSheetId)
其中,
list\u entry
gdata.spreadsheets.data.ListEntry
spreadsheetKey
worksheetId
的实例

我得到以下错误

  File "/home/gautam/Projects/osflow/build/runtime/gdata/spreadsheets/client.py", line 450, in update_cell
    **kwargs)
  File "/home/gautam/Projects/osflow/build/runtime/gdata/client.py", line 730, in update
    desired_class=entry.__class__, **kwargs)
  File "/home/gautam/Projects/osflow/build/runtime/gdata/client.py", line 319, in request
    RequestError)
RequestError: Server responded with: 403, If-Match or If-None-Match header or entry etag attribute required

如何解决此问题?

ListFeed追加行,而不是插入行,列需要列标题(我认为标题是必需的)

有关如何使用列表提要的示例,请参见


我没有经常使用列表提要,但感觉很像使用SQL,在这里可以进行筛选/追加等。我倾向于使用单元格提要。

那么有没有办法使用它来插入标题(第一行)?CellFeed可以让您添加标题行。如果我没记错的话,CellFeed是使用GData风格的电子表格API实现这一点的唯一方法。谷歌应用程序脚本可以更新和插入行。