Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked).
- Are you running your app locally or is it deployed?
I installed streamlit on my laptop to see if I can use it. But we don’t use environments so I saved it to …/r/pylib
I run it like …/r/pylib/bin/streamlit hello from the r directory. First the normal streamlit next to the streamlit.cmd couldn’t find itself, so I had to add the path to streamlit
with sys.path.extend([
str(Path(__file__).parent.joinpath('pylib')),
str(project_path)
])
but there’s probably more hocus pocus that I couldn’t find in the docs because normal people just make an environment and call it a day. I did install with pip
2. If your app is deployed:
It’s the hello app that comes from streamlit
3. Share the link to your app’s public GitHub repository
Maybe na?
4. Share the full text of the error message (not a screenshot).
2024-01-13 15:11:00.717 WARNING tornado.access: 404 GET / (::1) 0.92ms on the server and
404: Not Found in the browser. I didn’t go to localhost:3000 like the server suggested. I went to 8501 otherwise the connection was refused. Also, other servers like jupyter notebooks works, so I dont’ think its a firewall issue
5. Share the Streamlit and Python versions.
For this feat, I just ran my app without streamlit and with the path augmented. streamlit imported and print(streamlit.version) yielded 1.30.0. Who knows if that’s what’s running
python is 3.10.13
Here’s what my server says
~/.../pupu-platter/russell(main*)$ ./pylib/bin/streamlit hello
2024-01-13 15:10:45.708 WARNING streamlit.config:
Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'.
As a result, 'server.enableCORS' is being overridden to 'true'.
More information:
In order to protect against CSRF attacks, we send a cookie with each request.
To do so, we must specify allowable origins, which places a restriction on
cross-origin resource sharing.
If cross origin resource sharing is required, please disable server.enableXsrfProtection.
2024-01-13 15:10:45.815 DEBUG streamlit.web.server.server: Starting server...
2024-01-13 15:10:45.815 DEBUG streamlit.web.server.server: Serving static content from the Node dev server
2024-01-13 15:10:45.822 DEBUG streamlit.web.server.server: Server started on port 8501
2024-01-13 15:10:45.822 DEBUG streamlit.runtime.runtime: Runtime state: RuntimeState.INITIAL -> RuntimeState.NO_SESSIONS_CONNECTED
Welcome to Streamlit. Check out our demo in your browser.
Local URL: http://localhost:3000
Network URL: http://17.198.35.92:3000
Ready to create your own Python apps super quickly?
Head over to https://docs.streamlit.io
May you create awesome apps!
For better performance, install the Watchdog module:
$ xcode-select --install
$ pip install watchdog
2024-01-13 15:10:46.071 DEBUG streamlit.web.bootstrap: Setting up signal handler
2024-01-13 15:11:00.717 WARNING tornado.access: 404 GET / (::1) 0.92ms
^C Stopping...
2024-01-13 15:32:41.187 DEBUG streamlit.runtime.runtime: Runtime stopping...
2024-01-13 15:32:41.188 DEBUG streamlit.runtime.runtime: Runtime state: RuntimeState.NO_SESSIONS_CONNECTED -> RuntimeState.STOPPING
2024-01-13 15:32:41.188 DEBUG streamlit.runtime.runtime: Runtime state: RuntimeState.STOPPING -> RuntimeState.STOPPED