-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not Connect to the Neo4j database using langchain.graphs import Neo4jGraph #26897
Comments
Can you show the code you're using? |
To replicate the error, you can follow these steps: pip install langchain
pip install langchain_community
pip install neo4j url = "bolt://localhost:7687"
username ="neo4j"
password = "password"
database = "other_db"
graph = Neo4jGraph(
url=url,
username=username,
password=password,
database=database
)
graph.query("MATCH (n) RETURN n LIMIT 10") You will notice that the query is always run against the |
This should be the same issue: #27185 |
Added a fix: #27190 |
I'm experiencing the same problem in my code where queries are always run against the neo4j database, even when I specify a different database name. This issue started recently, it was working correctly about two weeks ago. |
Update to the latest version
V tor., 15. okt. 2024, 22:48 je oseba SimaIm ***@***.***>
napisala:
… I'm experiencing the same problem in my code where queries are always run
against the neo4j database, even when I specify a different database name.
This issue started recently, it was working correctly about two weeks ago.
@giuseppefutia <https://github.com/giuseppefutia> Could you please share
how you resolved it? Thanks
—
Reply to this email directly, view it on GitHub
<#26897 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYGGTNTIMV2B2NNY5HY4P3Z3U2LXAVCNFSM6AAAAABO47FUJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUGM4TMMBWGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Checked other resources
Example Code
I am running the following Python code:
However, it generates the following error:
I specified a different database name in the
neo4j_database
variable, but it seems to still attempt to connect to a database named "neo4j".To test the access to the database specified in the
neo4j_database
variable, I used the following script, and no issues or errors were raised:I am running the code in a colab notebook, and everything worked well until today when I re-installed everything from scratch.
Error Message and Stack Trace (if applicable)
No response
Description
It seems that langchain still attempts to connect to a database named "neo4j", also in the cases in which I specified a different database name
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: