You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we execute push_to_hub following the Theming Guide, pushing to space works and uploading theme also works.
However, the example demo in Hugging Face Spaces raises an runtime error.
I found out that push_to_hub copy the app.py code, which is different from the file for the current theme builder, builder_app.py.
It seems that error is raised because the default image link https://gradio.app/assets/img/header-image.jpg in app.py is expired (maybe after the update for converting the website into sveltekit).
Then, please visit https://huggingface.co/spaces/<your-id>/theme. It will show a runtime error.
Or, if you build again Spaces in Hugging Face pushed by push_to_hub, it will raise an error.
Screenshot
Logs
Traceback (most recent call last):
File "/home/user/app/app.py", line 65, in<module>
img = gr.Image(
File "/home/user/.local/lib/python3.10/site-packages/gradio/components/image.py", line 149, in __init__
IOComponent.__init__(
File "/home/user/.local/lib/python3.10/site-packages/gradio/components/base.py", line 176, in __init__
else self.postprocess(initial_value)
File "/home/user/.local/lib/python3.10/site-packages/gradio/components/image.py", line 296, in postprocess
return client_utils.encode_url_or_file_to_base64(y)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 372, in encode_url_or_file_to_base64
return encode_url_to_base64(path)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 360, in encode_url_to_base64
resp.raise_for_status()
File "/home/user/.local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.gradio.app/assets/img/header-image.jpg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/app/app.py", line 8, in<module>
with gr.Blocks(theme='deepkyu/theme_push_to_hub_v3.36.1') as demo:
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1472, in __exit__
self.config = self.get_config_file()
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1439, in get_config_file
props = block.get_config() if hasattr(block, "get_config") else {}
File "/home/user/.local/lib/python3.10/site-packages/gradio/components/image.py", line 174, in get_config
"value": self.value,
AttributeError: 'Image' object has no attribute 'value'
System Info
gradio==3.36.1
However, it is not version-specific issue because it happens from the broken link.
Severity
I can work around it
The text was updated successfully, but these errors were encountered:
Describe the bug
When we execute
push_to_hub
following the Theming Guide, pushing to space works and uploading theme also works.However, the example demo in Hugging Face Spaces raises an runtime error.
I found out that
push_to_hub
copy theapp.py
code, which is different from the file for the current theme builder,builder_app.py
.gradio/gradio/themes/base.py
Line 278 in 6d40cdc
It seems that error is raised because the default image link
https://gradio.app/assets/img/header-image.jpg
inapp.py
is expired (maybe after the update for converting the website into sveltekit).gradio/gradio/themes/app.py
Lines 65 to 67 in 6d40cdc
In
builder_app.py
which is used ingr.themes.builder()
, the default image link is different fromapp.py
.gradio/gradio/themes/builder_app.py
Lines 353 to 355 in 6d40cdc
You can see the error in my current space at my theme space (I'll close the space when this issue is closed).
The link in the below is the problematic line in space demo, which seems to be copied from
app.py
.https://huggingface.co/spaces/deepkyu/theme_push_to_hub_v3.36.1/blob/14cb1caac1dd7173679f73fbbcea6e9de89d6db3/app.py#L65-L67
Have you searched existing issues? 🔎
Reproduction
Please make your own theme and execute:
Then, please visit
https://huggingface.co/spaces/<your-id>/theme
. It will show a runtime error.Or, if you build again Spaces in Hugging Face pushed by
push_to_hub
, it will raise an error.Screenshot
Logs
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: