Slider raising "tuple not callable" error

I am setting up a basic streamlit application. I am using python3.8 and version 1.27.2 of streamlit.

I am trying to create a basic slider and I have copied the following code directly from the example in the slider documentation:

import streamlit as st

age = st.slider('How old are you?', 0, 130, 25)

This code gives me the follwoing error:>

TypeError: ‘tuple’ object is not callable

I have a created many other input elements, and the range slider is working fine for me. Any ideas as to why such a simple example is not working?

Hey @hjv,

I’m having trouble reproducing this error. Are you running your app via streamlit run <file name here>? And your Python file contains just those two lines of code?

Hi @hjv ,

Can you send the whole code your running and the entire error you are getting.

As I am not able to regenerate the error, it will be helpful.

Thank you

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