Closed ademait closed 5 days ago
Hi @ademait, thanks for reporting! This Space has been disabled by an admin, which created some side effect on the API. This should now be fixed (at least gives more explicit error). See:
Btw, it's best to catch huggingface_hub.utils._errors.HfHubHTTPError
is this case. It's a subclass of HTTPError
with more precise information. It's raised by huggingface_hub.urils.hf_raise_for_status
.
Hi @Wauplin , thank you for the fast reply! I have found another spaces with the same issues, I could share the names here
Hi @ademait, that would be helpful if you could yes. Thanks in advance!
Hi @Wauplin , the spaces that gave me the very same error are: "qandeelfatima/ImageToText", "lunarflu/test2","fastaioncampus/Classificador-de-carros","xzkqaq/1"
. I hope it helps 😄 Thank you for addressing the issue so fast!
Thanks @ademait! Seems like we can correctly retrieve runtime for all 4 Spaces now so all good :)
Describe the bug
Hi everyone,
When I try to get the space runtime or space info with:
It throws a
huggingface_hub.utils._errors.BadRequestError
with a body: """ Bad request: "metadata" is required """ I have checked on the website that the repositories that throw this error also show a 400 bad request in the website (check here). It happened to a few repositories, I can share the list.On the other side, I tried to catch the
huggingface_hub.utils._errors.BadRequestError
with:but it doesn't catch the exception. Am I properly importing the error? Is it because it throws an
HTTPError
instead ofBadRequestError
?Reproduction
from huggingface_hub import HfApi
api = HfApi() space_id = "WitchHuntTV/WinnieThePoohSVC_sovits4"
runtime = api.get_space_runtime(space_id)
Logs
System info