burnash/gspread — Issue #10:  sheet.row_values(1) crashed with ValueError
Author: ac001
Created: 2012-01-04 04:18:42+00:00
State: open

Here;s the test code, creating a new Worksheet, and then want to check the first row

tab_label = month_labels[m - 1]
try:
sheet = spreadsheet.worksheet(tab_label)

except gspread.exceptions.WorksheetNotFound:
sheet = spreadsheet.add_worksheet( tab_label, 1, len(col_defs) )
print "created"

print "sheet=", sheet

first_col = sheet.row_values(1) #<< error
print first_col

heet=
Traceback (most recent call last):
File "./alcontrol.py", line 87, in
first_col = sheet.row_values(1)
File "/home/geo2lab/geo2pylons/shell/gspread/models.py", line 286, in row_values
last_index = max(cells.keys())
ValueError: max() arg is an empty sequence