I had previously developed some Apps using the Streamlit brick. None of them appear to be working any longer.
It appears there is a conflict when using the App.run() function with the Streamlit brick.
Here is code to replicate the issue:
from arduino.app_utils import App
from arduino.app_bricks.streamlit_ui import st
st.title("Signal Error Below")
# Commenting out App.run() solves issue
App.run()
The error I am getting is:
ValueError: signal only works in main thread of the main interpreter
File "/app/python/main.py", line 7, in
App.run()
~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/arduino/app_utils/app.py", line 101, in run
self.loop(user_loop)
~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/arduino/app_utils/app.py", line 122, in loop
signal.signal(signal.SIGTERM, handle_sigterm)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/signal.py", line 58, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
When using a userloop in App.run, I am getting the same error - there is no easy fix for this case, I'll have to rewrite all the logic.
I seem to recall, perhaps incorrectly, that previously the streamlit brick was it's own docker container? When I check "docker ps" now, I only see the python-apps-base container running.
IMO the Streamlit brick is far superior to the HTML brick, as it require no additional JS, HTML, or CSS to be written/handled - it's quick and easy to build a webUI app - and I really hope this WebUI Streamlit Brick is not being deprecated.
Also, it is worth noting, the documentation for AppLab says:
App.run()
Every Python script must include the
App.run()function at the very bottom of the file to start the App. This command initializes App utilities and launches any imported Bricks. Note that the App framework ignores any code placed after
App.run()