Skip to content
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

load_sheet_by_name raises generic CalamineError instead of SheetNotFoundError #221

Closed
sean-moore3 opened this issue Apr 4, 2024 · 1 comment · Fixed by #222
Closed

Comments

@sean-moore3
Copy link

sean-moore3 commented Apr 4, 2024

Hi,

While loading a sheet from a reader, if a missing sheet name is provided a generic CalamineError is raised instead of the more specific SheetNotFoundError.

My use case is:

sheets = []
for reader in readers:
    try:
        sheet = reader.load_sheet_by_name("sheet_name")
    except SheetNotFoundError:
        continue
    # Do some other stuff with sheet before appending to list.
@sean-moore3 sean-moore3 changed the title load_sheet_by_name raises generic CalamineError instead of SheetNotFound error load_sheet_by_name raises generic CalamineError instead of SheetNotFoundError Apr 4, 2024
@PrettyWood
Copy link
Member

Hi @sean-moore3
Thanks for reporting this is indeed a bug. I'll push a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants