Disabled parameter not working

This error produces the TypeError: number_input() got an unexpected keyword argument 'disabled’ error:

# Indices of entries to extract

    idx = re.findall("\\d+", cols[0].text_input("Entries"))

    # Min. Entry and Max. Entries controls will be disabled if Entries are provided

    is_disabled = len(idx) > 0

    # Index of first FASTA to extract (starts from 1 on UI)

    min_idx = (

        cols[1].number_input("Min. Entry", min_value=1, value=1, disabled=is_disabled)

        - 1

    )

    # Number of entries to extract starting from min

    max_idx = cols[2].number_input(

        "Max. Entries", min_value=1, value=10, disabled=is_disabled

    )

According to documentation:

How can I fix that?

I had the same issue, I’m assuming the cloud version of streamlit isn’t updated to 1.4.0 so disabled widgets aren’t implemented yet.

  • How does one update the cloud-side streamlit version?
1 Like

Hi @rlf037 @Svantevith :wave:,

You can specify the version of Streamlit in the same manner you would for other Python dependencies in your app: App dependencies - Streamlit Docs

If you’re specifying Python dependencies via a requirements.txt file, you can pin a specific version of a package. For example, to install Streamlit 1.4.0, include the following line in requirements.txt:

streamlit==1.4.0

Happy Streamlit-ing! :balloon:
Snehan

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.