-
Notifications
You must be signed in to change notification settings - Fork 952
Description
Describe the bug
When downloading the model using the custom "sonatype" repository that has the https/ssl enabled even when the connection to the "sonatype" repository failed due to the missing certificates. snapshot_download just raises the following error which just keeps mileading from what is the exact cause:
LocalEntryNotFoundError: An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again.
Reproduction
run the following code using the sontype repository which has the ssl enabled and if you dont import the certificates into the client you just get the generic error message shared:
`import huggingface_hub
import sys
import logging
from huggingface_hub import snapshot_download
print(f"huggingface_hub version: {huggingface_hub.version}")
logger = logging.getLogger('huggingface_hub')
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)
model_name = "facebook/opt-1.3b"
local_dir = "/tmp/hugging_face_test/"
snapshot_download(
repo_id=model_name,
endpoint="https://:@/repository/huggingface-co",
repo_type="model",
local_dir=local_dir,
#headers=headers,
allow_patterns=None, # download everything
ignore_patterns=None
)`
Logs
Request xxxxxxxxx-zzzzzzz: GET https://<key>:<token>@<snotype-hostname>/repository/huggingface-co/api/models/facebook/opt-1.3b/revision/main (authenticated: True)
huggingface_hub version: 1.6.0
Request xxxxxxxxx-zzzzzzz: GET https://<key>:<token>@<snotype-hostname>/repository/huggingface-co/api/models/facebook/opt-1.3b/revision/main (authenticated: True)
LocalEntryNotFoundError: An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again.System info
huggingface_hub version: 1.6.0
ubuntu 22.4