不完整的错误:我正在尝试使用gspread阅读电子表格

时间:2016-06-01 14:11:36

标签: python python-2.7 httplib gspread

我正在使用get_all_values()函数,有时会抛出错误

content = worksheet.get_all_values()
File "/usr/local/lib/python2.7/dist-packages/gspread/models.py", line 339, in get_all_values
cells = self._fetch_cells()
File "/usr/local/lib/python2.7/dist-packages/gspread/models.py", line 226, in _fetch_cells
feed = self.client.get_cells_feed(self)
File "/usr/local/lib/python2.7/dist-packages/gspread/client.py", line 251, in get_cells_feed
return ElementTree.fromstring(r.read())
File "/usr/lib/python2.7/httplib.py", line 541, in read
return self._read_chunked(amt)
File "/usr/lib/python2.7/httplib.py", line 590, in _read_chunked
value.append(self._safe_read(chunk_left))
File "/usr/lib/python2.7/httplib.py", line 649, in _safe_read
raise IncompleteRead(''.join(s), amt)
IncompleteRead: IncompleteRead(16360 bytes read, 26 more expected)

我不知道为什么这种情况只会发生一些。有人可以解释所有可能的情况,以便我能处理这个问题。

我在这里读过https://stackoverflow.com/a/25214394/3981589循环遍历n个路径,这意味着它可能是连接问题或其他问题。

0 个答案:

没有答案