arnaudmiribel / streamlit-extras

Discover, try, install and share Streamlit re-usable bits we call "extras"!
https://extras.streamlit.app
Apache License 2.0
747 stars 127 forks source link

Getting error after importing the required packages #104

Closed Sarvoo closed 1 year ago

Sarvoo commented 1 year ago

gather_metrics() got an unexpected keyword argument 'name'

louispk commented 1 year ago

I am also encountering this issue when trying to import switch_page to use for Page switching buttons. Issue persists after package reinstall and across devices, currently installed version is 0.2.4

Thanks for any help in advance!

arnaudmiribel commented 1 year ago

Oh wow, hi @louispk I was exactly writing to ask for more details. Can you tell me your Streamlit version as well?

arnaudmiribel commented 1 year ago

I tried to reproduce the error but it's all working great for me with streamlit==1.16.0 and streamlit-extras==0.2.4

Code:

from importlib.metadata import version

import streamlit as st
from streamlit_extras.switch_page_button import switch_page

st.write("Extras version", version("streamlit-extras"))
st.write("Streamlit version", st.__version__)

if st.button("Click"):
    switch_page("Page 1")
louispk commented 1 year ago

Thanks for the quick reply. Seems to be my fault as I was still running streamlit 1.13.0 for some reason, updating to 1.16.0 solved it :)

arnaudmiribel commented 1 year ago

Sweet! Well, lucky you, because streamlit 1.16.0 has some great new features ;) And thank you for both filing the issue and coming back to check!