neo4j无法连接到本地主机

时间:2020-04-04 07:42:51

标签: neo4j neo4j-python-driver

我正在尝试使用jupyter和neo4j bolt python软件包连接到我的图形数据库。 我不确定为什么不按照我的说明进行操作。 我可以使用neo4j浏览器连接到数据库,但不能通过python连接。 任何帮助将不胜感激!

使用

graphdb = GraphDatabase.driver(uri =“ bolt:// localhost:7687”,auth =(“ neo4j”,“ hetionet”))

我收到此错误:image of error here

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-27-30c3d9541515> in <module>()
----> 1 graphdb=GraphDatabase.driver(uri="bolt://localhost:7687",auth=("neo4j","hetionet"))

/home/seasonedtofu/.local/lib/python2.7/site-packages/neo4j/__init__.pyc in driver(cls, uri, **config)
    118         :class:`.Driver` subclass instance directly.
    119         """
--> 120         return Driver(uri, **config)
    121 
    122 

/home/seasonedtofu/.local/lib/python2.7/site-packages/neo4j/__init__.pyc in __new__(cls, uri, **config)
    159         for subclass in Driver.__subclasses__():
    160             if parsed_scheme in subclass.uri_schemes:
--> 161                 return subclass(uri, **config)
    162         raise ValueError("URI scheme %r not supported" % parsed.scheme)
    163 

/home/seasonedtofu/.local/lib/python2.7/site-packages/neo4j/__init__.pyc in __new__(cls, uri, **config)
    233 
    234         pool = ConnectionPool(connector, instance.address, **config)
--> 235         pool.release(pool.acquire())
    236         instance._pool = pool
    237         instance._max_retry_time = config.get("max_retry_time", default_config["max_retry_time"])

/home/seasonedtofu/.local/lib/python2.7/site-packages/neobolt/direct.pyc in acquire(self, access_mode)
    713 
    714     def acquire(self, access_mode=None):
--> 715         return self.acquire_direct(self.address)
    716 
    717 

/home/seasonedtofu/.local/lib/python2.7/site-packages/neobolt/direct.pyc in acquire_direct(self, address)
    606                 if can_create_new_connection:
    607                     try:
--> 608                         connection = self.connector(address, error_handler=self.connection_error_handler)
    609                     except ServiceUnavailable:
    610                         self.remove(address)

/home/seasonedtofu/.local/lib/python2.7/site-packages/neo4j/__init__.pyc in connector(address, **kwargs)
    230 
    231         def connector(address, **kwargs):
--> 232             return connect(address, **dict(config, **kwargs))
    233 
    234         pool = ConnectionPool(connector, instance.address, **config)

/home/seasonedtofu/.local/lib/python2.7/site-packages/neobolt/direct.pyc in connect(address, **config)
    970         raise ServiceUnavailable("Failed to resolve addresses for %s" % address)
    971     else:
--> 972         raise last_error

error: [Errno 0] Error

0 个答案:

没有答案