Error in progress bar


Getting an error when trying to run the example from the documentation/

Steps to reproduce

Code snippet:

import streamlit as st
import time

progress_text = "Operation in progress. Please wait."
my_bar = st.progress(0, text=progress_text)

for percent_complete in range(100):
    my_bar.progress(percent_complete + 1, text=progress_text)

I’m copying the above code to Pycharm and trying to run it and i recieve an error message

** ERROR **
progress_bar = st.progress(0, text=“test”)
TypeError: progress() got an unexpected keyword argument ‘text’

Debug info

  • Streamlit version:1.12.0
  • Python version: 3.9.12
  • Using Conda? No
  • OS version:10
  • Browser version: chrome 110.0.5481.177


Look at the version number to the right of the function name in the documentation. Make sure it matches your version of streamlit.


Hi @David_Hay, welcome to the forum! :wave: :partying_face:

Adding to what Goyo said, the text parameter for st.progress was added in v1.18.0. So you’ll have to update your version to streamlit>=1.18.0 to use the feature. :balloon:

1 Like