-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_all_records with unique expected_headers fails in version 5.12 #1352
Comments
Hello thank you for raising this issue. We'll have a look at it. We might need more information later. |
Hi, I have looked into it and it is a bug which was introduced by #1301. It is a fault of us and the tests that it was not caught. Thanks for letting us know about this bug! I have fixed the bug in #1353, which will soon be released as v5.12.1. Context
here I only care about the "datum 1" and "datum 2" columns, but I want to use The problemIn v5.11.3 and before the logic in
In v5.12.0 this changed and the logic became +all headers must be unique
if expected_headers is not set:
-all headers must be unique
data is returned
if expected_headers is set:
expected_headers must be unique
expected_headers must be a subset of headers
data is returned and data from columns with headers not in expected_headers might be lost That is to say, the uniqueness check was outside the I suspect this was changed because the purpose of |
Hi. Please read the proposal for changing how |
Describe the bug
We have a spreadsheet with duplicated headers. We find a list of just the unique headers and pass this to
worksheet.get_all_records(expected_headers=expected_headers)
In version 5.11.3 this works, only the columns passed to expected_headers are returned
In version 5.12.0 this no longer works, we get the error
gspread.exceptions.GSpreadException: headers must be unique
(sorry I dont have time to add more info now, but I can later if the above is not sufficient!)
To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
Expected behavior
A clear and concise description of what you expected to happen.
Code example*
If applicable, provide a code example to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment info:
Stack trace or other output that would be helpful
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: