1

I'm trying to connect to Neo4j using Python but I get an error related to Bolt Protocol in the line

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

I ran the code using the driver neo4j-driver 4.0.2. I've also tried neo4j-driver 4.1.1 and I've got the same problem.

Am I missing some configuration?

Traceback (most recent call last):
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\__init__.py", line 194, in bolt_driver
    return BoltDriver.open(target, auth=auth, **config)
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\__init__.py", line 357, in open
    pool = BoltPool.open(address, auth=auth, pool_config=pool_config, workspace_config=default_workspace_config)
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 510, in open
    seeds = [pool.acquire() for _ in range(pool_config.init_size)]
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 510, in <listcomp>
    seeds = [pool.acquire() for _ in range(pool_config.init_size)]
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 523, in acquire
    return self._acquire(self.address, timeout)
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 395, in _acquire
    connection = self.opener(address, timeout)
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 507, in opener
    return Bolt.open(addr, auth=auth, timeout=timeout, **pool_config)
  File "C:\Users\Anita Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\io\__init__.py", line 212, in open
    raise BoltHandshakeError("The Neo4J server does not support communication with this driver. This driver have support for Bolt Protocols {}".format(supported_versions), address=address, request_data=handshake, response_data=data)
neo4j._exceptions.BoltHandshakeError: The Neo4J server does not support communication with this driver. This driver have support for Bolt Protocols dict_keys([Version(3, 0), Version(4, 0)])

 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):   File "src/load_db.py", line 11,
 in <module>
     driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))   File "C:\Users\Anita
 Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\__init__.py",
 line 181, in driver
    return cls.bolt_driver(parsed.netloc, auth=auth, **config)   File "C:\Users\Anita
 Caron\AppData\Local\Programs\Python\Python38\lib\site-packages\neo4j\__init__.py",
 line 197, in bolt_driver
     raise ServiceUnavailable(str(error)) from error neo4j.exceptions.ServiceUnavailable: The Neo4J server does not support
 communication with this driver. This driver have support for Bolt
Protocols dict_keys([Version(3, 0), Version(4, 0)])
Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Anita
  • 65
  • 8
  • 1
    I saw the link in `@cybersam`'s comment and I downgraded my driver to 1.7.6 and it worked!!!!! – Anita Nov 01 '20 at 11:20
  • Are you really using `neo4j` as the password? I would recommend logging in to Neo4j using the browser, and then changing the password. Then try logging in with that new password. – Adrian Keister Nov 02 '20 at 18:56
  • Yes. I've solved already, thanks. – Anita Nov 03 '20 at 10:40
  • Please do not edit solution announcements into the question. Accept (i.e. click the "tick" next to it) one of the existing answer, if there are any. You can also create your own answer, and even accept it, if your solution is not yet covered by an existing answer. – Yunnosch Apr 06 '21 at 07:09

1 Answers1

0

Try refreshing the tox cache, as mentioned in this neo4j issue.

cybersam
  • 63,203
  • 6
  • 53
  • 76