尝试从 gdata 获取工作表列表时,我偶尔会遇到错误。并非所有电子表格都会发生这种情况,但同一电子表格会在几天到几周内始终如一地发生。我怀疑权限,但无法找到导致错误的电子表格的任何特殊权限。我正在使用 OAuth2、gdata 2.0.18 和 Python 2.6.8。
Traceback (most recent call last):
File "/mnt/shared_from_host/snake/base/fetchers/google_spreadsheet/common.py", line 176, in get_worksheet_list
feed = client.get_worksheets(spreadsheet_id)
File "/home/ubuntu/.virtualenvs/snakeenv/lib/python2.6/site-packages/gdata/spreadsheets/client.py", line 108, in get_worksheets
**kwargs)
File "/home/ubuntu/.virtualenvs/snakeenv/lib/python2.6/site-packages/gdata/client.py", line 640, in get_feed
**kwargs)
File "/home/ubuntu/.virtualenvs/snakeenv/lib/python2.6/site-packages/gdata/client.py", line 278, in request
version=get_xml_version(self.api_version))
File "/home/ubuntu/.virtualenvs/snakeenv/lib/python2.6/site-packages/atom/core.py", line 520, in parse
tree = ElementTree.fromstring(xml_string)
File "<string>", line 86, in XML
SyntaxError: no element found: line 1, column 0
这似乎来自请求获得一个空字符串作为响应。
有没有人知道为什么这可能不起作用或排除故障的想法?谢谢。