io.EOF error persists over 5 restarts when requirements.txt is light and spaces maintenance is up. (Gradio Space)
Also done factory rebuild, but error persists.
getting the same issue
same error
True… Even with just default Chatbot Gradio Space… @hysts
# build error
## Job failed with exit code: 1. Reason: cache miss: [run 1/3] COPY --link ./ /app cache miss: [run 3/3] LINK COPY --from=pipfreeze --link /pipfreeze/ /pipfreeze/ cache miss: [run 2/3] RUN mkdir -p /home/user && ( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true cache miss: [run 1/3] LINK COPY --link ./ /app {"total":26,"completed":26,"user_total":14,"user_cached":9,"user_completed":14,"user_cacheable":13,"from":1,"miss":4,"client_duration_ms":52928}
Build logs:
===== Build Queued at 2025-11-11 00:23:06 / Commit SHA: 1ac3b79 =====
--> FROM docker.io/library/python:3.10@sha256:e944d95e7277b5888479cc4bcd6cec63e3128fec9ec4c6ef099be470d89b54d4
DONE 0.0s
--> WORKDIR /app
CACHED
--> COPY --from=root / /
CACHED
--> RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 && rm -rf /var/lib/apt/lists/* && git lfs install
CACHED
--> RUN pip install --no-cache-dir pip -U && pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
CACHED
--> RUN apt-get update && apt-get install -y curl && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* && apt-get clean
CACHED
--> RUN pip freeze > /pipfreeze/freeze.txt
CACHED
--> RUN mkdir -p /pipfreeze
CACHED
--> COPY --link ./ /app
DONE 0.0s
--> RUN pip install --no-cache-dir gradio[oauth,mcp]==5.42.0 "uvicorn>=0.14.0" spaces
CACHED
--> Restoring cache
DONE 1.6s
--> COPY --link ./ /app
CACHED
--> Restoring cache
DONE 10.7s
--> RUN mkdir -p /home/user && ( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true
DONE 0.0s
--> COPY --from=pipfreeze --link /pipfreeze/ /pipfreeze/
DONE 0.0s
--> Pushing image
error: io.EOF failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
retrying in 1s
error: io.EOF failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
retrying in 2s
error: io.EOF failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
retrying in 4s
error: io.EOF failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
retrying in 8s
error: io.EOF failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
--> ERROR: failed to push spaces-registry-us.huggingface.tech/spaces/691281e51cff05bce24a146f:cpu-1ac3b79-7b2ml31m: failed to do request: Head "https://spaces-registry-us.huggingface.tech/v2/spaces/691281e51cff05bce24a146f/manifests/cpu-1ac3b79-7b2ml31m": EOF
Im seeing the same issue…
The issue has already been flagged internally. The infra team is looking into it. Thanks!
Thanks! hysts.
The issue has been resolved! Thanks for your patience!
Thank you @hysts , I get this error now:
runtime error
Exit code: 1. Reason: Traceback (most recent call last): File "/app/app.py", line 5, in <module> import gradio as gr File "/usr/local/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module> import gradio._simple_templates File "/usr/local/lib/python3.10/site-packages/gradio/_simple_templates/__init__.py", line 1, in <module> from .simpledropdown import SimpleDropdown File "/usr/local/lib/python3.10/site-packages/gradio/_simple_templates/simpledropdown.py", line 7, in <module> from gradio.components.base import Component, FormComponent File "/usr/local/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "/usr/local/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 15, in <module> from gradio.components.base import Component File "/usr/local/lib/python3.10/site-packages/gradio/components/base.py", line 21, in <module> from gradio.blocks import Block, BlockContext File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 31, in <module> from gradio import ( File "/usr/local/lib/python3.10/site-packages/gradio/networking.py", line 15, in <module> from gradio.routes import App # HACK: to avoid circular import # noqa: F401 File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 83, in <module> from gradio.oauth import attach_oauth File "/usr/local/lib/python3.10/site-packages/gradio/oauth.py", line 13, in <module> from huggingface_hub import HfFolder, whoami ImportError: cannot import name 'HfFolder' from 'huggingface_hub' (/usr/local/lib/python3.10/site-packages/huggingface_hub/__init__.py)
Hi @mma666 , the error seems to be a different issue from the infra issue discussed here. You might want to check your code.
Seems library version mismatch?
Your Gradio is importing a symbol that was removed from huggingface_hub v1.0. The class HfFolder no longer exists, and Gradio fixed this by switching to get_token(). (GitHub)
Fix it one of these ways:
- Upgrade Gradio to the fixed release
# check current versions
python - <<'PY'
import gradio, huggingface_hub
print("gradio", gradio.__version__, "| huggingface_hub", huggingface_hub.__version__)
PY
# upgrade to a version that removed the HfFolder import
pip install -U "gradio>=5.7.1" "huggingface_hub>=1.0.0"
Gradio 5.7.1 contains the commit replacing HfFolder.get_token with get_token. (Gradio)
- Or pin
huggingface_hubbelow 1.0 (works with older Gradio)
pip install "huggingface_hub<1.0"
HfFolder exists in 0.x, so old Gradio keeps working. (GitHub)
Compatibility notes you may care about:
-
If you use
transformersv4, it prefershuggingface_hub0.x. In that case either keephub<1.0or upgrade Gradio first so both sides are happy. (Hugging Face) -
Matrix for quick reasoning:
Thank you @John6666 for your help, I upgraded the gradio to 5.49.1 and it works now.