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

Handle missing input file explicitly #226

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

brandonrobertz
Copy link
Contributor

This PR introduces a check for and raises an exception when the user passes a non-existing file as input. Without this PR, when the user passes a non-existing file this error is raised:

Exception AttributeError: "Xlsx2csv instance has no attribute 'ziphandle'" in <bound method Xlsx2csv.del of <main.Xlsx2csv instance at 0x02BD9940>> ignored

This is the same exception raised when a non-XLSX file is passed, making debugging a little confusing. This PR makes the situation clear.

Check for and raise an exception when the user passes a
non-existing file as input. This makes such errors easier
to identify, as opposed to the code path and exception that
is raised with a non-existing file is passed (which also happens
to be the same exception raised when a non-XLSX file is passed,
making this error confusing).
@indigoviolet
Copy link

@dilshod can this be merged?

@cscortes
Copy link

Did this ever get merged?

@dilshod dilshod merged commit dc1f8f5 into dilshod:master Sep 13, 2023
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 this pull request may close these issues.

None yet

4 participants