Running my streamlit app outside of code studio

info-rchitect
info-rchitect Registered Posts: 189 ✭✭✭✭✭✭

Hi,

Using code studio was not possible, due to the Python version restriction, so I created a blank Python web app. My streamlit app is stored in a Python package, which I uploaded into my project's code environment. I ran my streamlit app file and got the following error:

2023-05-17 17:06:14.042 [33m[1mWarning:[0m to view this Streamlit app on a browser, run it with the following command: streamlit run /data/dataiku/dataiku-dss-11.3.2/python/dataiku/webapps/backend.py [ARGUMENTS]2023-05-17 17:06:14.043 No runtime found, using MemoryCacheStorageManager2023-05-17 17:06:14.044 Session state does not function when running a script without `streamlit run`2023-05-17 17:06:14.044 No runtime found, using MemoryCacheStorageManager2023-05-17 17:06:14,048 ERROR Backend main loop failed

Is there anyway this can be done?

thx


Operating system used: Windows 10

Answers

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker

    Hi @info-rchitect
    ,

    Running streamlet webapp outside of Code Studio in DSS is not supported.
    You would need to invoke "streamlit run" which is not done as part of the standard webapp.

    In a future release we will allowing usage of a custom code code environment with streamlit from a code studio, which would remove the restriction of using Python3.7 in an upcoming release.

    Thanks

  • info-rchitect
    info-rchitect Registered Posts: 189 ✭✭✭✭✭✭

    @AlexT
    Any ETA on that new feature?

  • kk9
    kk9 Registered Posts: 1

    Hi @AlexT

    I am running into a similar problem. I converted my streamlit app to an .exe file and used st.session_state as well so I ran into the same error as OP. However, I am unable to run `streamlit run main.exe` as streamlit run can only operate with .py files. How do I then open my .exe file and also use st.session_state?

Setup Info
    Tags
      Help me…