[Beginner Help] My space stuck on Starting with TypeError: argument of type 'bool' is not iterable

Hi everyone, greetings from Korea!

I’m a student currently learning development, and I’ve been working on a project called StemX (an audio separator). Since I’m not a native English speaker, I’m writing this post with the help of an AI translator. I hope you understand if some expressions fells unnatural :smiley:

My Hugging Face Space is persistently stuck on the Starting state. My container logs show that the server is running, but the UI never appears. Instead, I see this traceback:

  File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 898, in get_type
    if "const" in schema:
TypeError: argument of type 'bool' is not iterable

What I’ve tried

  • Tested Multiple Gradio Versions : I’ve tried 4.44.0, 4.44.1, 5.1.0, 5.15.0, and 6.10.0, butthe error remains the same.
  • Environments : I tried pinning pydantic and fastapi versions in requirements.txt, but it didn’t solve the starting loops.
  • Code : My AI suspect the error triggers when Gradio tries to generate the API schema for my gr.update(visible=True) logic. So I modified gr.update, and it worked for a while, but it stopped again after the visibility update.

My Space Link: [My space]

I am very passionate about finishing this project, but this sechnical issue is very difficult for me to solve alone. If anyone has encountered this “bool is not iterable“ error or knows a stable version combination for HuggingFace Spaces, I would be very grateful for your advice.

Thank you so much for your time and help!

Based solely on those symptoms, adding pydantic==2.10.6 to the end of requirements.txt is likely the most effective quick fix. (This is a workaround for version drift related to the HF Gradio space backend.)

However, if the root cause lies deeper, a more tailored solution will likely be necessary.

You passed a wrong argument for api_name in

    submit_btn.click(
        fn=process_audio,
        inputs=[audio_in, mode_in],
        outputs=[status_out, files_out],
        api_name=False
    )

It should be passed a string value (see Gradio Docs).

(Separately, be aware that there’s an ongoing issue with Hugging Face spaces building updates, which is unrelated to your code.)

Ooooh, Thank you very much!! I’ll remove it and try again :smiley:
Also, thanks for letting me know about the build issue!

Aaah, I’m not sure if the reply was written correctly. XD