Overview
When deploying an app to Hugging Face Spaces, the following error occurred. This is a memo about that error.
Creating new Ultralytics Settings v0.0.6 file ✅
View Ultralytics Settings with 'yolo settings' or at '/home/user/.config/Ultralytics/settings.json'
Update Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. For help see https://docs.ultralytics.com/quickstart/#ultralytics-settings.
WARNING ⚠️ DetectMultiBackend failed: No module named 'huggingface_hub.utils._errors'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/yolov5/helpers.py", line 38, in load_model
model = DetectMultiBackend(
File "/usr/local/lib/python3.10/site-packages/yolov5/models/common.py", line 338, in __init__
result = attempt_download_from_hub(w, hf_token=hf_token)
File "/usr/local/lib/python3.10/site-packages/yolov5/utils/downloads.py", line 150, in attempt_download_from_hub
from huggingface_hub.utils._errors import RepositoryNotFoundError
ModuleNotFoundError: No module named 'huggingface_hub.utils._errors'
During handling of the above exception, another exception occurred:
Reference
The following article was helpful.
https://github.com/ml-explore/mlx-examples/issues/994
Solution
The error was resolved by downgrading huggingface-hub as follows.
huggingface-hub==0.24.7
Summary
I hope this serves as a useful reference.