【问题标题】:ERROR: ConfigurationError: URI scheme 'http' is not supported错误:ConfigurationError:不支持 URI 方案“http”
【发布时间】:2022-01-06 20:39:48
【问题描述】:

enter image description here

尝试使用命令将 Neo4j 浏览器连接到 jupyter:

data_base_connection = GraphDatabase.driver(uri = "http://localhost:7474/browser?dbms=neo4j://ellahn3@localhost:7687&db=Graph_ex", auth=("neo4j", "ellahn054"))

输出:

ConfigurationError:不支持 URI 方案“http”。支持的 URI 方案是 ['bolt', 'bolt+ssc', 'bolt+s', 'neo4j', 'neo4j+ssc', 'neo4j+s']。示例:bolt://host[:port] 或 neo4j://host[:port][?routing_context]

有什么问题?

【问题讨论】:

    标签: python-3.x neo4j cypher


    【解决方案1】:

    使用以下代码进行数据库连接,因为您使用驱动程序而不是通过浏览器(通过 http)连接到 neo4j。

    uri = "bolt://localhost:7687"
    driver = GraphDatabase.driver(uri, auth=("neo4j", "ellahn054"))
    

    参考:https://neo4j.com/docs/api/python-driver/current/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-25
      相关资源
      最近更新 更多