ValueError: signal only works in main thread

Hi, I’m getting this ValueError when I run my app. It was running fine just a couple weeks ago, so I’m not sure what changed. I didn’t edit anything within the app, but perhaps some component updated?

ValueError: signal only works in main thread


File "/Users/rosalin/Documents/Streamlit/.env/lib/python3.6/site-packages/streamlit/", line 322, in _run_script
    exec(code, module.__dict__)File "/Users/rosalin/Documents/Streamlit/alok-Tolstoy/Alok-Preeti-Botanical/", line 65, in <module>'', port=5000, debug=True)File "/Users/rosalin/Documents/Streamlit/.env/lib/python3.6/site-packages/flask/", line 990, in run
    run_simple(host, port, self, **options)File "/Users/rosalin/Documents/Streamlit/.env/lib/python3.6/site-packages/werkzeug/", line 1050, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)File "/Users/rosalin/Documents/Streamlit/.env/lib/python3.6/site-packages/werkzeug/", line 330, in run_with_reloader
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))File "/Users/rosalin/anaconda3/lib/python3.6/", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))

Hi @asor12 -

Can you provide a code snippet that shows what you are doing? Ideally, a GitHub repo so we can run the code ourselves?