-
Notifications
You must be signed in to change notification settings - Fork 937
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
Create worksheet name conflict result in error with no message #359
Comments
It's a pretty easy fix. I mean, the error is exactly what it says on the tin. Someone wrote an HTTPError class and then tries to show you the message on that class, but didn't actually get around to creating a message attribute. I added a quick fix for this in my PR. #390 It just raises a RequestError using the error string that you get back from the Google API, which tend to be pretty reliable and informative. I'm not sure when or if my PR will get merged, but if it doesn't it should be a pretty easy thing to fix regardless. |
This is not the case anymore. Did a test:
this is due to the following rule in Google API: "he name of the file. This is not necessarily unique within a folder." here This means you can create multiple files with the same name in a single folder, they will all have different IDs. What could be useful here is an option like: "fail if already exists", before the actual HTTP call, gspread could check for a file existence of the same name (and returns its id in this case, or open the actual file, to be thought through). |
Using new GoogleAPI this is not relevant anymore. Closing this issue. |
I propose wrapping this in a custom exception. WorksheetExistsException?
The text was updated successfully, but these errors were encountered: