Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Skip ETag check if OSError #4469

Merged
merged 4 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed a bug in `TextClassificationPredictor` so that it passes tokenized inputs to the `DatasetReader`
in case it does not have a tokenizer.
- reg_loss is only now returned for models that have some regularization penalty configured.
- Fixed a bug that prevented `cached_path` from downloading assets from GitHub releases.

### Added

Expand Down
4 changes: 4 additions & 0 deletions allennlp/common/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ def get_from_cache(url: str, cache_dir: Union[str, Path] = None) -> str:
url,
)
raise
except OSError:
# OSError may be triggered if we were unable to fetch the eTag.
# If this is the case, try to proceed without eTag check.
etag = None

filename = url_to_filename(url, etag)

Expand Down