I’m having an issue when I try to use a conditional statement to display text. My code is as follows:
st.header('Expected Winnings Based on Risk Profile') option = st.radio("What level of risk would you like to adopt?",("High","Medium","Low")) if option == "High": st.write("Your expected returns are: ",High_Risk_Winnings) elif option == "Medium": st.write("Your expected returns are: ",Medium_Risk_Winnings) else: st.write("Your expected returns are: ",Low_Risk_Winnings)
High / Medium / Low _Risk_Winnings are all objects from my preceding code.
Once I’ve run the code, when I click on one of the radio buttons I get the following error message:
AttributeError: ‘_thread._local’ object has no attribute 'value’
Is anyone able to help me please?