In this case, it looks like there is a mismatch in the supported Vega-Lite version, where you are trying to use a newer version than supported by Streamlit. Would you happen to be able to find a Vega-Lite version 4 of the same chart?
I tried with streamlit 1.10.
always fail. I find the same error as you and my initial error.
I managed to plot with altair but I find that customization is more difficult than with vega and its format.
I managed to plot other graphics in vega and yet when I work on the vega editor, everything is fine. On the contrary when I plot with st.vega, it adds lines which gives me the error that you found during your first message. these lines are visible when we open the graph (which is not visible) from the streamlit application with the vega editor.