Hi, I tried to convert my streamlit app to a .exe file, and it seems to have successfully been converted including all the imports for the libraries I have used in my app.py file.
Link to github repo: https://github.com/tungkei/Streamlit-App-Exe
I am using streamlit ver 1.34.0 and python 3.10.
However, upon clicking the exe file, I have 2 errors:
- the streamlit app is able to open on my local host but I get a popup that says “Bad message format, tried to use SessionInfo before it was initialized”, I assume because I used st.session_state (can refer to my app.py file)
note: I don’t get this error when i simply runstreamlit run app.py
on my terminal before I tried creating the exe - I get an error in my console:
Exception in callback AppSession._on_scriptrunner_event.<locals>.<lambda>() at streamlit\runtime\app_session.py:487
handle: <Handle AppSession._on_scriptrunner_event.<locals>.<lambda>() at streamlit\runtime\app_session.py:487>
Traceback (most recent call last):
File "asyncio\events.py", line 80, in _run
File "streamlit\runtime\app_session.py", line 487, in <lambda>
lambda: self._handle_scriptrunner_event_on_event_loop(
File "streamlit\runtime\app_session.py", line 577, in _handle_scriptrunner_event_on_event_loop
self._create_new_session_message(
File "streamlit\runtime\app_session.py", line 705, in _create_new_session_message
imsg.is_hello = self._script_data.is_hello
TypeError: 'str' object cannot be interpreted as an integer
not sure if this error was due to my exe file not being created successfully/properly, and whether the 2 issues are related.