Unverified Commit 04ac3245 authored by Nick Doiron's avatar Nick Doiron Committed by GitHub
Browse files

fix: link to HF repo/tree/revision when a file is missing (#30406)

fix: link to HF repo tree when a file is missing
parent 179ab098
...@@ -451,7 +451,7 @@ def cached_file( ...@@ -451,7 +451,7 @@ def cached_file(
revision = "main" revision = "main"
raise EnvironmentError( raise EnvironmentError(
f"{path_or_repo_id} does not appear to have a file named {full_filename}. Checkout " f"{path_or_repo_id} does not appear to have a file named {full_filename}. Checkout "
f"'https://huggingface.co/{path_or_repo_id}/{revision}' for available files." f"'https://huggingface.co/{path_or_repo_id}/tree/{revision}' for available files."
) from e ) from e
except HTTPError as err: except HTTPError as err:
resolved_file = _get_cache_file_to_return(path_or_repo_id, full_filename, cache_dir, revision) resolved_file = _get_cache_file_to_return(path_or_repo_id, full_filename, cache_dir, revision)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment