Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Oct 18, 2024
1 parent fd5836a commit 1ef1e39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datasets/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,9 @@ def dataset_module_factory(
proxies=download_config.proxies,
)
commit_hash = os.path.basename(os.path.dirname(dataset_readme_path))
except EntryNotFoundError:
except EntryNotFoundError as e:
if "internet connection" in str(e).lower():
raise ConnectionError(f"Couldn't reach '{path}' on the Hub ({e.__class__.__name__})") from e
commit_hash = api.dataset_info(
path,
revision=revision,
Expand Down

0 comments on commit 1ef1e39

Please sign in to comment.