IndexError when building Space


I created this space: Haar Cascade Face Detection - a Hugging Face Space by johko
It runs without a problem on my local machine, but on Spaces it fails to build with this error:

Traceback (most recent call last):
  File "", line 59, in <module>
    Iface = gr.Interface(
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 599, in __init__
    self.examples_handler = Examples(
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 154, in __init__
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 189, in cache_interface_examples
    raise e
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 185, in cache_interface_examples
    prediction = self.process_example(example_id)
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 201, in process_example
    processed_input = [
  File "/home/user/.local/lib/python3.8/site-packages/gradio/", line 202, in <listcomp>
IndexError: list index out of range

Just found an existing issue for that: HF API + Spaces give error + uninformative error message · Issue #1643 · gradio-app/gradio · GitHub
So more a Gradio version than really Spaces related topic I guess

1 Like