# Huggingface space failed after working initially

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%3E%5C
**Category:** Spaces\
**Created:** [September 5, 2024, 9:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514 "2024-09-05T21:49:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kz919](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kz919/32/31282_2.png) [@kz919](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkz919)%5C
**Post date:** [September 5, 2024, 9:49pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F1 "2024-09-05T21:49:50Z")

</div>

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

> **[Persona AI - a Hugging Face Space by kz919](https://huggingface.co/spaces/kz919/Persona-AI)**
>
> Discover amazing ML apps made by the community

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

```auto

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:

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 5, 2024, 10:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F2 "2024-09-05T22:22:30Z")

</div>

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.

> **[John6666/blue-real-xl-v10-sdxl · connection errored out](https://huggingface.co/John6666/blue-real-xl-v10-sdxl/discussions/1#66da0ffd3211d62230fe877b)**
>
> i have connection errored out each time i submit prompt whereas i don't have this issue when using other model. I tried to restart space many times but still doesn't work.

> [@Run time error for huggingface space](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Frun-time-error-for-huggingface-space%2F15090)%3A
>
> Hi, I’m trying to deploy a gradio image recognition app on huggingface space. After the app starts building, it works, but after a while, there is a run time error, and the error message in the “see logs” says, “Running on local URL: [http://localhost:7860/](http://localhost:7860/) \*\*\* Failed to connect to ec2.gradio.app:22: [Errno 110] Connection timed out” I have no idea why it is the case and why it is running on local url instead of the public space. The app only works if I restart the space or edit a file. One …

---

<div class="post-metadata">

**Author:** ![dlflannery](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dlflannery](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdlflannery)%5C
**Post date:** [September 5, 2024, 10:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F3 "2024-09-05T22:58:35Z")

</div>

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:

```auto
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)

---

<div class="post-metadata">

**Author:** ![kz919](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kz919/32/31282_2.png) [@kz919](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkz919)%5C
**Post date:** [September 5, 2024, 10:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F4 "2024-09-05T22:59:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kz919](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kz919/32/31282_2.png) [@kz919](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkz919)%5C
**Post date:** [September 5, 2024, 11:01pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F5 "2024-09-05T23:01:25Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![dlflannery](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dlflannery](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdlflannery)%5C
**Post date:** [September 5, 2024, 11:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F6 "2024-09-05T23:15:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 5, 2024, 11:21pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F7 "2024-09-05T23:21:36Z")

</div>

> **[@John6666 on Hugging Face: "@victor Sorry for the repetitiveness.

I'm not...](https://huggingface.co/posts/John6666/191046582909567)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

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

---

<div class="post-metadata">

**Author:** ![kz919](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kz919/32/31282_2.png) [@kz919](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkz919)%5C
**Post date:** [September 5, 2024, 11:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F8 "2024-09-05T23:56:26Z")

</div>

found a similar with this leaderboard:

> **[HHEM Leaderboard - a Hugging Face Space by vectara](https://huggingface.co/spaces/vectara/leaderboard)**
>
> Discover amazing ML apps made by the community

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…

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 6, 2024, 1:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F9 "2024-09-06T01:06:01Z")

</div>

> **[@John6666 on Hugging Face: "@victor Sorry for the repetitiveness.

I'm not...](https://huggingface.co/posts/John6666/191046582909567#66da54a46ef25234630e9580)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

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

---

<div class="post-metadata">

**Author:** ![dlflannery](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@dlflannery](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdlflannery)%5C
**Post date:** [September 6, 2024, 3:13am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhuggingface-space-failed-after-working-initially%2F105514%2F10 "2024-09-06T03:13:34Z")

</div>

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