Sinaptik-AI / pandas-ai

Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
https://pandas-ai.com
Other
12.75k stars 1.23k forks source link

SqliteConnector has no attribute host #1067

Closed LiquidGunay closed 6 months ago

LiquidGunay commented 6 months ago

System Info

OS: Ubuntu Python: 3.10 Same error on multiple pandasai versions from 2.07 to latest

🐛 Describe the bug

When I initialise an agent with a list of SqliteConnectors (one for each table of my db), and then proceed to chat with it, it throws an attribute error: SqliteConnector has no attribute host. I suspect there is an issue in the input validation.

gventuri commented 6 months ago

@LiquidGunay it has probably be caused by the upgrade of pandas. Can you check out if the latest version works?

LiquidGunay commented 6 months ago

No this did not fix the issue. As a workaround I modified the equals function of sql.py to not check for host and port and downgraded sqlalchemy to <2.0

YarShev commented 6 months ago

@gventuri, it looks like reverting the upgrade of pandas doesn't affect this issue. Can we upgrade pandas and Modin once again?

YarShev commented 6 months ago

@gventuri, just a friendly reminder on my question above. Are you okay if I submit a PR on that matter once again?

gventuri commented 6 months ago

@YarShev that was another bug (which has been fixed as part of #1071). Unfortunately we're still trying to figure out how to fixe the issue with pandas > 2 breaking the SQL connectors relying on SQLalchemy, but the upgrade to pandas 2.0 is one of the priorities.

YarShev commented 6 months ago

@gventuri, ah, I see! Thanks for letting me know this. Is there an open issue for the problem you mentioned about the SQL connectors relying on SQLalchemy?

gventuri commented 6 months ago

@YarShev sure, here's the issue: https://github.com/Sinaptik-AI/pandas-ai/issues/1085

YarShev commented 6 months ago

@gventuri, thank you for creating an issue for the problem!