You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
sheet.get_all_records() throws an index error when the sheet is blank, or even when the sheet has only a header row with the column names.
To Reproduce
Steps to reproduce the behavior:
Make a blank sheet OR make a sheet with only a header row with the column names (but otherwise no records)
sheet = doc.worksheet("your-sheet-name")
sheet.get_all_records()
Expected behavior
The function should return an empty list, indicating there are no records.
Code example*
see reproduction above
Environment info:
Operating System [e.g. Linux, Windows, macOS]: mac, linux
Python version: 3.x
gspread version: various, including newest 5.12
The text was updated successfully, but these errors were encountered:
Hi. Please read the proposal for changing how get_all_records works for next release 6.0.0 -> #1367. We would enjoy if you would contribute your opinion :)
Describe the bug
sheet.get_all_records() throws an index error when the sheet is blank, or even when the sheet has only a header row with the column names.
To Reproduce
Steps to reproduce the behavior:
sheet = doc.worksheet("your-sheet-name")
sheet.get_all_records()
Expected behavior
The function should return an empty list, indicating there are no records.
Code example*
see reproduction above
Environment info:
The text was updated successfully, but these errors were encountered: