Checklist
Summary
The issue is quite simple, spaces in numbers break the number_input widget.
I don't think the streamlit widget allows me to preprocess the string, like removing spaces or comma separating thousands.
I am not sure if this is a bug or a feature request and I am sorry if this is not the right tag.
While a comma can mean different things in French and in English, I believe spaces universally only are there to separate 1000s, and I would guess it would be both fairly easy and intuitive to implement.
Additionally, the "buggy" input still returns None, which is the default value I have set in my example, this means I cannot filter a faulty input and no input at all. One could argue that I shouldn't use None as my default value, but it seems to me this would be standard for an optional input.
Reproducible Code Example

import streamlit as st
st.number_input(
"Test number input",
value=None,
help="The input cannot handle number with spaces in it.",
key="number",
)
st.write(st.session_state["number"])
Steps To Reproduce
input any number with a space in it like "100 000" the output would be None.
Expected Behavior
st.number_input should either accept numbers with spaces in it, allow the user to pre-process the string or raise / output something more explicit in case of a buggy input
Current Behavior
No response
Is this a regression?
Debug info
- Streamlit version: 1.49.1
- Python version: 3.11
Additional Information
I'm currently building an interface for non-tech-savvy coworkers, and they are meant to copy paste numbers into my interface.
This means I would either teach all of them that there is this quirk with streamlit they have to adapt to or turn the number_input into a text input, which is such a shame.
Checklist
Summary
The issue is quite simple, spaces in numbers break the number_input widget.
I don't think the streamlit widget allows me to preprocess the string, like removing spaces or comma separating thousands.
I am not sure if this is a bug or a feature request and I am sorry if this is not the right tag.
While a comma can mean different things in French and in English, I believe spaces universally only are there to separate 1000s, and I would guess it would be both fairly easy and intuitive to implement.
Additionally, the "buggy" input still returns None, which is the default value I have set in my example, this means I cannot filter a faulty input and no input at all. One could argue that I shouldn't use None as my default value, but it seems to me this would be standard for an optional input.
Reproducible Code Example
Steps To Reproduce
input any number with a space in it like "100 000" the output would be None.
Expected Behavior
st.number_input should either accept numbers with spaces in it, allow the user to pre-process the string or raise / output something more explicit in case of a buggy input
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
I'm currently building an interface for non-tech-savvy coworkers, and they are meant to copy paste numbers into my interface.
This means I would either teach all of them that there is this quirk with streamlit they have to adapt to or turn the number_input into a text input, which is such a shame.