Error Dissabling

I completed my model but there are some warnings that can be seen in between the processing of my project, which I donโ€™t want.
Is there a method to disable the warnings of errors?

Hey @Siddhharth_Sharma. Welcome to the Streamlit community! :raised_hands:

A screenshot would help me understand whatโ€™s going on!

In the meantime though, Iโ€™ll guess that your issue might be due to Python exceptions propagating out of your code and onto the main app screen. If so, I would suggest catching them and processing them, or even just ignoring them as follows:

try:
  your.code.here()
except:
  # Prevent the error from propagating into your Streamlit app.
  pass

Happy app creating! :balloon:

Hello
I have the same question. I show an error-text with the try/except code, but the errorbox of Streamlit is still shown

Kind regards
Rene

The variable name might be wrong here.

1 Like

I get the error because I entered a text instead of a number. But that is why I made the error-handling and that works because the message is shown.

I just want to get rid of that coloured box.

EDIT
I found out how to do it in a nice way

numberofcasesdayz = (st.sidebar.text_input('Number of cases on day zero', 130000))
    try:
        numberofcasesdayzero = int(numberofcasesdayz)
    except:
        st.error("Please make sure that you only enter a number")
        st.stop()