# Unkown Type Error in Space

**URL:** <https://discuss.huggingface.co/t/unkown-type-error-in-space/17240>\
**Category:** 🔒 Gradio\
**Created:** [April 27, 2022, 8:35am UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240 "2022-04-27T08:35:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuelinferences](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@samuelinferences](https://discuss.huggingface.co/u/samuelinferences)\
**Post date:** [April 27, 2022, 8:35am UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/1 "2022-04-27T08:35:08Z")

</div>

Hi There,

I made a Space a while ago ([Transformers Can Do Bayesian Inference - a Hugging Face Space by samuelinferences](https://huggingface.co/spaces/samuelinferences/transformers-can-do-bayesian-inference)). It was great and worked well. Then, suddenly it did not work anymore. I did not change a thing in the mean time.

The error, I get is

```auto
Running on local URL: http://localhost:7860/

To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/gradio/routes.py", line 269, in predict
    output = await run_in_threadpool(app.launchable.process_api, body, username)
  File "/home/user/.local/lib/python3.8/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py", line 28, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
  File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 818, in run_sync_in_worker_thread
    return await future
  File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 754, in run
    result = context.run(func, *args)
  File "/home/user/.local/lib/python3.8/site-packages/gradio/interface.py", line 573, in process_api
    prediction, durations = self.process(raw_input)
  File "/home/user/.local/lib/python3.8/site-packages/gradio/interface.py", line 618, in process
    processed_output = [
  File "/home/user/.local/lib/python3.8/site-packages/gradio/interface.py", line 619, in <listcomp>
    output_component.postprocess(predictions[i])
  File "/home/user/.local/lib/python3.8/site-packages/gradio/outputs.py", line 908, in postprocess
    raise ValueError(
ValueError: Unknown type. Please choose from: 'plotly', 'matplotlib', 'bokeh'.

```

I don’t understand this error and think it is internal actually. I tried to fix the gradio version to the version likely used back then, but that did not help either. Any ideas? Can’t find this in the current codebase of gradio either.

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [April 28, 2022, 1:44pm UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/2 "2022-04-28T13:44:15Z")

</div>

Hello and welcome to our Forum 🤗

Gradio has recently added support for different plotting libraries. You should define the plot as:  
`plot = gr.outputs.Plot(type="bokeh")` (or pick `Plotly` or `Matplotlib`) and pass it to the inferface 🙂

---

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [April 28, 2022, 2:10pm UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/3 "2022-04-28T14:10:08Z")

</div>

FYI we now also automatically set the `sdk_version` in the `README.md` to pin a version of Gradio. You might want to add it as well. Here is an example [README.md · ysharma/text-to-ner-to-image-to-video at main](https://huggingface.co/spaces/ysharma/text-to-ner-to-image-to-video/blob/main/README.md#L7)

---

<div class="post-metadata">

**Author:** ![samuelinferences](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@samuelinferences](https://discuss.huggingface.co/u/samuelinferences)\
**Post date:** [April 28, 2022, 2:14pm UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/4 "2022-04-28T14:14:07Z")

</div>

Thank You! This fixed it 🙂

---

<div class="post-metadata">

**Author:** ![samuelinferences](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@samuelinferences](https://discuss.huggingface.co/u/samuelinferences)\
**Post date:** [April 28, 2022, 2:14pm UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/5 "2022-04-28T14:14:49Z")

</div>

That would be good to do, do you know where to find the version currently used by a space?

---

<div class="post-metadata">

**Author:** ![osanseviero](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/osanseviero/32/38738_2.png) [@osanseviero](https://discuss.huggingface.co/u/osanseviero)\
**Post date:** [May 1, 2022, 9:28am UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/6 "2022-05-01T09:28:55Z")

</div>

If it’s not specified, you are using the latest `gradio` version which is 2.9.4 if I recall correctly.

---

<div class="post-metadata">

**Author:** ![mikeee](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mikeee/32/3485_2.png) [@mikeee](https://discuss.huggingface.co/u/mikeee)\
**Post date:** [August 31, 2022, 5:11am UTC](https://discuss.huggingface.co/t/unkown-type-error-in-space/17240/7 "2022-08-31T05:11:42Z")

</div>

The sdk version in my README.md ([README.md · mikeee/radio-embed at main](https://huggingface.co/spaces/mikeee/radio-embed/blob/main/README.md) sdk: gradio  
sdk\_version: 3.0.17) is fixed yet I got errors suddenly for reasons unknown.

It worked previously and I didn’t change anything. Now it simply does not work. I tried  
`Restart` and `Factory reboot`. It did not help. The log shows something like:

```auto
ERROR: Exception in ASGI application
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
...

```

I testedthe whole thing locally. It ran without a problem.

Please help me fix it or give me some pointers on how to fix it. (Some of my other spaces got similar problems.)

Thanks a lot.
