Number_input error

According to documentation labels are optional for number_input but it doesn’t seem to be working. Am I doing something wrong here?


col3, col4 = st.sidebar.beta_columns([.3,1])

test1 = col3.write("Input")
test2 = col4.number_input()


TypeError: number_input() missing 1 required positional argument: ‘label’


  • label ( str or None ) – A short label explaining to the user what this input is for.

Just confirming that the same error occurs with a vanilla number_input widget

import streamlit as st

if __name__ == "__main__":
    a = st.number_input()
    if a:

TypeError: number_input() missing 1 required positional argument: 'label'

Hey @stazy and @Cells,

Thanks for bringing this to our attention! :hugs: You are not doing anything wrong, I have been able to replicate this quite easily. It seems that our documentation and our actual widget behaviour on this one differ! :astonished:

I am going to bring this to the attention of our engineering team so we can get this adjusted! In the meantime, the best way to get your apps working is to add a label when you call st.number_input('name').

Happy Streamlit-ing!

Hello all!

I have made a github report for this error in the Docs! Thanks again :nerd_face:

Happy Streamlit-ing!