-
Notifications
You must be signed in to change notification settings - Fork 639
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: actual error won't be raised while force_download=True
#1983
Conversation
Thanks for opening a PR about this @scruel! THinking about it, I think what we should do is to rework this line from raise ValueError(
"We have no connection or you passed local_files_only, so force_download is not an accepted option."
) to if local_files_only:
raise ValueError("Cannot pass 'force_download=True' and 'local_files_only=True' at the same time.")
elif isinstance(head_call_error, OfflineModeIsEnabled):
raise ValueError("Cannot pass 'force_download=True' when offline mode is enabled.") from head_call_error
else:
raise head_call_error What I'm afraid with the current PR is that we might be missing some exceptions that we want to actually raise. So instead of raising on |
Agree, it will be more clear! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for iterating on it 🤗
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1983 +/- ##
==========================================
- Coverage 82.49% 82.45% -0.04%
==========================================
Files 66 66
Lines 8145 8150 +5
==========================================
+ Hits 6719 6720 +1
- Misses 1426 1430 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes @scruel! Looks good to me now 🎉
No description provided.