networkx-neo4j icon indicating copy to clipboard operation
networkx-neo4j copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory

Open MohammadHeydari opened this issue 4 years ago • 1 comments

Hi. I already installed the lib without any problem. when I run the

import nxneo4j
import os
from neo4j.v1 import GraphDatabase, basic_auth

user_name = os.environ.get("NEO4J_USER", "neo4j")
password = os.environ.get("NEO4J_PASSWORD", "123")

driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth(user_name, password))

I encounter with this error: FileNotFoundError: [Errno 2] No such file or directory which refers to this line

driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth(user_name, password))

I also tested this but it doesn't work. bolt://localhost:7687

MohammadHeydari avatar Apr 06 '20 12:04 MohammadHeydari

This works:

from neo4j import GraphDatabase

uri = "bolt://localhost:7648"
driver = GraphDatabase.driver( uri, auth=('neo4j', '123'),encrypted=False)

Replace with your port number

mongoose54 avatar Apr 06 '20 23:04 mongoose54