St.metric() error - AttributeError: module 'streamlit' has no attribute 'metric'

I am using a simple st.metric('label', 123) in my app, but it results in the following error:

AttributeError: module ‘streamlit’ has no attribute ‘metric’

I have tried with both streamlit version 0.88 and 0.87. Is this a bug, or has anyone else experienced this issue?

1 Like

Hi @mcurrier,

First, welcome to the Streamlit community!!! :partying_face: :partying_face: :tada: :tada: :star_struck: :nerd_face:

Can you tell me a bit more about your setup so I can try to reproduce the error your seeing?

  • python version
  • environment setup (pip/conda and its version)?
  • operating system version
  • your code (a GitHub link is preferable if not a slightly larger snippet that shows st.metric in context would be helpful!)

Happy Streamlit-ing!
Marisa