Comments (8)
Hey y'all, just a quick update that we are going to discuss the issue & potential fix (#8610) tomorrow and I'll keep you posted. Sorry for the inconvenience and thanks for reporting the issue with these details ❤️
from streamlit.
We have merged #8620 that should fix this issue, so it should land in streamlit-nightly and latest in 1.35
🙂
from streamlit.
Acknowledged! This behavior change seems to have been introduced via this PR, since now the Component Registry is loaded from the runtime and is not a singleton anymore. When you run the standalone command, the runtime does not seem to be initialized, resulting in the error you are seeing.
I will talk with the team and get back to you with regards to this. I am wondering whether there is a good way to solve this without invoking Streamlit under the hood at all in order to just print the version of the python package.
from streamlit.
Hello,
this is the same issue I raised here: NathanChen198/streamlit-rsa-auth-ui#1
Worked in 1.33 but in 1.34 its broken. Raises a RunTimeError too.
from streamlit.
I can confirm the same issue as well for the import of custom components.
Reproducable code:
Expects custom component streamlit_elements
is installed
file: streamlit_bug_report.py
import streamlit as st
# This line raises "RuntimeError: Runtime hasn't been created!" in streamlit>=1.34.0
from streamlit_elements import elements, dashboard, mui, nivo
def app():
# assume somthing with the streamlit_elements component happens here
st.write("Hello World")
if __name__ == "__main__":
app()
runs fine if one starts the app with streamlit run streamlit_bug_report.py
But if the app is started via cli with help of streamlit.web.bootstrap its now raising an error since streamlit version 1.34.0
.
file: streamlit_bug_report_cli.py
import streamlit as st
import streamlit.web.bootstrap as st_bootstrap
from streamlit_bug_report import app
def main():
if st.runtime.exists():
# The app has been executed with `streamlit run app.py`
app()
else:
# If the file has been executed with python (`python app.py`), the streamlit functionality
# won't work. This line reruns the app within the streamlit context, as if it has been
# executed with `streamlit run app.py`.
# This is necessary when installing this project from a .whl package, since the executable
# only gets execute by python and not by streamlit.
st_bootstrap.run(
__file__,
is_hello=False,
args=[],
flag_options={},
)
if __name__ == "__main__":
main()
Running python streamlit_bug_report_cli.py
will raise RuntimeError: Runtime hasn't been created!
from streamlit.
The issue also affects automated tests in packages like streamlit-folium
, where custom components are tested without actually running Streamlit.
from streamlit.
Awesome, thanks!
from streamlit.
If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.
Your feedback helps us prioritize which bugs to investigate and address first.
from streamlit.
Related Issues (20)
- 'display_text` of LinkColumn doesn't work when display a pandas styler object HOT 2
- Selection events for maps HOT 1
- Zoom/pan events for maps HOT 1
- Zoom/pan events for charts HOT 1
- streamlit does not produce WebSocket ping frames HOT 4
- add `get_tornado_instance` as an experimental API HOT 4
- Nested Selectbox Component HOT 2
- Video input support for `st.chat_input` HOT 1
- `st.multiselect` is too high when multiple options are selected HOT 2
- I miss Brazilian Portuguese on the list HOT 2
- Be able to close cached resources (@st.cache_resource) HOT 1
- st.tabs cause blank page starting >1.26.0 HOT 2
- st.button - add delay to `help` tooltip HOT 1
- `st.code` ignores language argument if set to 'diff' HOT 2
- Commas can't be removed from numbers in `st.dataframe` HOT 1
- https://ssg-sea.streamlit.app/ does not extract any skills. HOT 3
- KeyError (only in terminal) when accessing session_state key in a multipage app HOT 2
- Unify dropdown styles for `st.selectbox`, `st.multiselect`, and `st.date_input` HOT 1
- `st.time_input` has different height than other elements HOT 2
- Set sidebar min-width to prevent `st.logo` from hiding the X to close it HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamlit.