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

Fix missing URLError import statement #395

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tonelli-m
Copy link

Hi all, I found that there was a missing import statement in datasets/utils.py so if there is an error while downloading a sofa file the code raises an exception saying that URLError is not found instead of either skipping silently or re-raising the exception. So here is a tiny PR to fix this. I've also took the liberty to base the re-raised exception on the caught one to keep the original error message in the new exception, as it might give the end user insight on why the URL request failed.

This is my first PR for this repo so please let me know if it needs some changes in code style or whatever 🙂

That also lead me to some other observations about the whole handling of SOFA files: why are some files directly included in the repo and some other are missing and must be fetched remotely? Maybe it would make sense to leave the user the choice at the moment of creating the SOFA database which are the files that they will actually need? In my case I only needed to access the files that were already part of the library when you install it but I was still blocked because of this failing URL request. If those questions are out of scope for this PR let me know and I'll open a separate issue to discuss it 🙂

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.

1 participant