Hello everyone,
I hope someone can help me to understand how to resolve this problem trying to access Neo4j from jupyter nootebook using langchain.graphs with Neo4jGraph: from langchain.graphs import Neo4jGraph
I am using a PC with Windows 11
I am using Docker to deploy Neo4j and followed the following steps, monitoring with Docker Desktop:
I have pulled image neo4j:
docker pull neo4j:5.13.0
I have run a container with the following string of commands:
docker run --name neo4j -e NEO4J_AUTH=user/password -p 7474:7474 -p 7687:7687 -v $PWD\data:/data -v $PWD\plugins:/plugins -e NEO4J_apoc_export_file_enabled=true -e NEO4J_apoc_import_file_enabled=true -e NEO4J_apoc_import_file_use__neo4j__config=true -e NEO4JLABS_PLUGINS='["apoc-extended"]' -e NEO4J_dbms_security_procedures_unrestricted=apoc.* -e NEO4J_dbms_security_procedures_allowlist=apoc.* neo4j:5.13.0
Seems everything is ok with the graphdb checking with Docker Desktop:
Authentication is ok
Bind mounts are ok in my file system
I have copied the file apoc-5.13.0-extended.jar in /plugins in my file system
Checking Files in Docker Desktop I can see /data and /plugins seems to be fine (I can see the .jar file inside plugins)
In Enviroments I can see this:
"Env": [
"NEO4JLABS_PLUGINS=[apoc]",
"NEO4J_dbms_security_procedures_unrestricted=apoc.*",
"NEO4J_dbms_security_procedures_allowlist=apoc.*",
"NEO4J_AUTH=neo4j/pleaseletmein",
"NEO4J_apoc_export_file_enabled=true",
"NEO4J_apoc_import_file_enabled=true",
"NEO4J_apoc_import_file_use__neo4j__config=true",
"PATH=/var/lib/neo4j/bin:/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"JAVA_HOME=/opt/java/openjdk",
"NEO4J_SHA256=c5b1834ae4493af9c623c7d4d68783de1f87d73adea34cd973d9daa3c2ea056c",
"NEO4J_TARBALL=neo4j-community-5.13.0-unix.tar.gz",
"NEO4J_EDITION=community",
"NEO4J_HOME=/var/lib/neo4j"
]
I have followed all the steps in:
and
and still got this error:
ValueError: Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration
Something additional is that when I run the container with:
NEO4JLABS_PLUGINS='["apoc-extended"]'
NEO4JLABS_PLUGINS='["apoc"]'
NEO4J_PLUGINS='["apoc-extended"]'
or
NEO4J_PLUGINS='["apoc"]'
I got these lines of error during execution:
parse error: Invalid numeric literal at line 1, column 2
parse error: Invalid numeric literal at line 1, column 2
when I remove NEO4J_PLUGINS environment configuration those errors don't appear.
But in both cases the main error trying to use Neo4J with langchain remains:
ValueError: Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration
I believe apoc plugin is not installed but I cannot find a way to do it effectively
Please help