New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Streamlit 1.34] AttributeError: module 'streamlit.components' has no attribute 'v1' #8644
Comments
Hey @SiddhantSadangi , the docs state to import and use it like this import streamlit as st
import streamlit.components.v1 as components
components.html("example") This works for me in version |
Hey @raethlein Yes, it does work if imported as stated in the docs. However, it'd be great if this change can be highlighted in the docs and the |
You are welcome 🙂 I have also investigated a little bit why this changed and it seems to be that this should never have been possible, and was made transiently available via this import: There seem to be some places where we indeed advocate it like this: |
run command pip install streamlit==1.32 |
Checklist
Summary
Streamlit v1.34 seems to have removed
v1
fromstreamlit.components
, leading to anAttributeError
when trying to usestreamlit.components.v1.html()
.There is no mention of any such change in the changelog, and the documentation still includes
v1.html()
in v1.34.0: https://docs.streamlit.io/develop/api-reference/custom-components/st.components.v1.htmlstreamlit.html()
does not support all features supported bycomponents.v1.html()
, likeheight
, and is not a good enough substitute yet.Reproducible Code Example
Steps To Reproduce
Expected Behavior
v1.html()
should be an attribute ofstreamlit.components
Current Behavior
Is this a regression?
Debug info
Additional Information
Using as
streamlit._main._html()
works.Using as
also works.
The text was updated successfully, but these errors were encountered: