我正在尝试编写一个写入Google Docs Spreadsheet的脚本,当我运行它时,我会在标题中看到错误.进一步来说:
File "/home/pi/Desktop/templog.py", line 44, in <module>
s.run()
File "/usr/lib/python2.7/sched.py", line 117, in run
action(*argument)
File "/home/pi/Desktop/templog.py", line 35, in do_something
entry = spr_client.InsertRow(data_str, spreadsheet_key, worksheet_id)
File "/usr/local/lib/python2.7/dist-packages/gdata/spreadsheet/service.py", line 330, in InsertRow
for k, v in row_data.iteritems():
AttributeError: 'str' object has no attribute 'iteritems'
Run Code Online (Sandbox Code Playgroud)
造成这种情况的代码是:
entry = spr_client.InsertRow(data_str, spreadsheet_key, worksheet_id)
if isinstance(entry, gdata.spreadsheet.SpreadsheetsList):
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9369 次 |
| 最近记录: |