Sqlite engine not working correctly in streamlit app

I have been playing around with text-to-SQL llm agent using llama index. The way I have set it up is the ReAct agent of LlamaIndex has a bunch of text-to-SQL query engines. This agent is only initialized once when a streamlit button is pressed is stored in a st.session_state variable. This did not work.

I tried another method of having a function that returns the agent. No button is being used here The function also has a st.cache_resource decorator. This approach didnโ€™t work either.

This is the error encountered in both approaches:

raise exc.NoSuchTableError(
sqlalchemy.exc.NoSuchTableError: aggregated_monthly_transactions

Please help me solve this problem. I donโ€™t want to reinitiate the agent again and again

@Caroline could you help me with this?

Hey @Vishwas_Gowda,

Can you share a minimal reproducible example that we can use to troubleshoot this issue?