Huggingface space failed after working initially

It was working before, but then it stopped working suddenly. After factory reboot, it still fails.

The front end shows “Connection errored out.”
error log:


Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 279, in _init_core_attrs
    self._core_schema = _getattr_no_parents(self._type, '__pydantic_core_schema__')
  File "/usr/local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 121, in _getattr_no_parents
    raise AttributeError(attribute)
AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception occurred:
1 Like

I just woke up and haven’t checked properly yet, but probably the same here.
I don’t think it’s your fault, but HF’s error.

1 Like

Same here. Any button.click event in my Gradio python app immediately gives the connection timed out error message . This is not a new app but I have been modifying it so initially suspected it was my code, although the identical code works when I run it locally in VS2022.

Just as a simple test to rule out my app, I commited the following code as app.py:

import os
import gradio as gr

def sum(a, b):
    return str(float(a) + float(b))

with gr.Blocks() as demo:
    input_a = gr.Textbox(label = 'Value 1', value = '0')
    input_b = gr.Textbox(label = 'Value 2', value = '0')
    result_box = gr.Textbox(label = 'Result', value = '0')
    button_go = gr.Button(value = 'GO')
    button_go.click(fn=sum, inputs = [input_a, input_b], outputs = result_box)
demo.launch(share = True)

And get the same error when clicking the GO button. The log shows a slew of pydantic errors (greek to me). (And the code runs fine locally in VS2022)

1 Like

yeah it’s annoying though…
I tried different versions of the app and adding/removing the queue, it still breaks…

but how come some spaces are still working, but some doesn’t. I also tried starting a paid tier machine so that it will probably swap out the old and potentially degraded machine… but it still doesn’t work. Some manual resetting is probably needed at this point…

I’ve spent several hours trying to figure out what in my code was causing this problem, before concluding: it isn’t me!

Is there some more direct, immediate way to alert HF to this? There status page keeps saying all is well with spaces.

1 Like

I also reported it to the post.
Or rather, someone else reported it before I reported it.

found a similar with this leaderboard:

Is this an arbitrary issue or it follows certain pattern?
This is published by huggingface folks themselves… They must have been aware of the issue…

Setting fastapi==0.112.2 in requirements has helped me as a temporary fix.

It appears that Gradio 4.43.0 (just released) is the fix.

1 Like