Hello everyone,
I don’t know if it’s my problem or not but whenever I try to use Streamlit component st.logo in version 1.38.0 it doesn’t show on screen. I tried with a local path or a url but none of them work. I think that the problem is related to the version, because before updating it worked well.
Thank you for your attention!
Hey @Alessandro1, thanks for reporting the issue. So far, this is the first report we have received that st.logo
does not work with version 1.38
. Could you please share what operating system you are using, which Python version and best also the Python code for which this issue happens? For this kind of issue, we usually recommend to open a GitHub issue in our repository, because the template there has fields for these information. However, I am also happy to help here
The version of Python is 3.11.4 and I’m on Windows.
This is the code I’m using:
def setup_sidebar():
st.sidebar.expander("Sidebar", expanded=True)
st.logo("img/logo_colori.png")
st.sidebar.image("img/logo_colori.png", use_column_width=True)
st.sidebar.title("About")
st.sidebar.info(
"""
Web App made with Streamlit by the developer Alessandro Guerrisi
with the help of ***SR Inv*** team.
"""
)
Then I import the method in all the pages to setup the sidebar. I tried to call the method even inside on of the pages but it doesn’t work.
Thank you for your support and for the information about GitHub for this kind of issue.
You are welcome
Interesting, the code snippet you provided works for me just fine locally on macOS, Streamlit 1.38
and Python 3.12.4
. Could it perhaps be a caching issue or a location issue of the image file?
Do you see any errors when looking at the Developer console in the browser (when the Streamlit page is opened → Right click → Inspect)?
No, I don’t see any error in the developer console. Could it be the size of the image? Because with the previous version the logo was there, but now nothing shows on the sidebar or on the page’s body.
The image is inside a directory called “img”.
Are you able to send the image here? Then I could have a look at whether it would work on my side using the same image.
Works for me on Windows using that image.
Thank you very much for the support. The only thing I can think of is to update the version of Python but I don’t get why with the previous version works perfectly.
I find it hard to believe that the python version has anything to do with your issue.
Yeah for me it works also with this image. Maybe its worth trying out in a different browser or so? I also cannot imagine that it is a Python version issue
I tried to run it on Edge and finally it works. So the problem is related to Chrome browser.
Thank you so much for your support.
Thanks for updating us In this case it might make sense to empty the cache and hard reload the page in Chrome
J’avais aussi une image qui ne s’affichait pas sans aucun message d’erreur. J’ai diminué sa taille et c’était bon. Je n’ai pas trouvé d’informations sur la taille maxi en pixel des images.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.