StreamlitAPIException: _repr_html_() is not a valid Streamlit command

StreamlitAPIException : _repr_html_() is not a valid Streamlit command.

Traceback:

File "C:\Users\Dell\Dropbox\My PC (DESKTOP-Q65MJBI)\Downloads\work\Deployement-of-Flight-Price-in-Streamlit-main\app.py", line 126, in <module>
    run()File "C:\Users\Dell\Dropbox\My PC (DESKTOP-Q65MJBI)\Downloads\work\Deployement-of-Flight-Price-in-Streamlit-main\app.py", line 73, in run
    st.write(depart)

How to resolve this error?

Hi @Deepika_Goel, welcome to the Streamlit community!! :wave: :partying_face:

Would you mind sharing a bit of context for what you are trying to write with st.write(depart)? A code snippet showing us what the object depart is would help with debugging.

Note: we currently do not support the __repr_html__ property on objects: Support for `_repr_html_` property on objects Β· Issue #1117 Β· streamlit/streamlit Β· GitHub

Best, :balloon:
Snehan