LlamaIndex: ObjectNotExecutableError

Hi All. I’m facing a problem when deploying an app that uses LlamaIndex’s Database Reader. The app fetches data from Snowflake tables and work perfectly on local machine. However. during deployment to the community cloud it throws’ an error:

sqlalchemy.exc.ObjectNotExecutableError: Not an executable object: ‘SHOW /* sqlalchemy:get_table_names */ TABLES’

The app has the following requirements:


What I tried already:
Used different versions of Python while deploying
Used different versions of llama-index, sqlalchemy and snowflake-sqlalchemy libraries.

Does anyone here had similar issue?

Did you configure the streamlit’s cloud secrets while deploying?

I did, it seems like the issue is related to specific versions of snowflake-connector-python or snowflake-sqlalchemy. However, I wasn’t able to fix it yet

Hi @Oleksandr_Arsentiev it is probably the dependency issue. Could you refer this conda channel and ping the snowflake-connector-python==3.1.0 and sqlalchemy==1.4.39

thank you, it seems like the dependency issue is caused by llama-index. Strangely enough, it works on my local machine. Should snowflake-snowpark-python be added to the requirements? This is what I got from the Streamlit console:

llama-index 0.8.29 depends on sqlalchemy>=2.0.15
snowflake-sqlalchemy 1.5.0 depends on sqlalchemy<2.0.0 and >=1.4.0

@Oleksandr_Arsentiev i see it looks like there is known issue in sqlalchemy support for snowflake-sqlalchemy . There is a patch i found in the thread and hope this helps with the issue

thanks! In the time being I just forked llama-index repo and changed the requirements to support sqlalchemy <2.0.0,>=1.4.0. Works fine for the hackathon :slight_smile: