Open jakubMitura14 opened 2 months ago
@jakubMitura14 , I am also facing the same issue recently, but it was working fine a few months ago. I use neo4j 4.3.9 python driver. Did you get to work around this by any means? Thanks.
Yes it works now - for some reason connection with local neo4j do not work but when I build the neo4j docker from official repository and supply url to this it works
Solution: Update to a newer version of Neo4j
TL;DR: I faced the same issue because I had an older version of Neo4j, and there might be a change in Cypher syntax.
Explanation:
When you create a Neo4jGraph object, it executes a method called refresh_schema
, which refreshes the Neo4j graph schema information. This involves running two queries:
constraint = self.query("SHOW CONSTRAINTS")
index = self.query("SHOW INDEXES YIELD *")
In my version of Neo4j (4.1.1), attempting to run these queries resulted in an error. Therefore, it appears that the Cypher syntax has changed. Updating to a newer version of Neo4j will resolve this issue, which also explains why it works fine with Neo4j's Docker image.
is there any other workaround than upgrading to newer version?
Checked other resources
Example Code
I checked first connection and the following code works
Hovewer trying to connect
gives error
Error Message and Stack Trace (if applicable)
Description
I am trying to load Neo4jGraph from langchain_community.graphs. Issue is simmilar to https://github.com/langchain-ai/langchain/discussions/17643 ; Hovewer in cited issue no solution was supplied .
System Info
langchain==0.1.15 langchain-community==0.0.32 langchain-core==0.1.41 langchain-experimental==0.0.57 langchain-openai==0.1.2 langchain-text-splitters==0.0.1
Python 3.10.12
Docker Ubuntu 20