I am following a tutorial about py2neo, I am moving the first steps.
I want to connect to a graph I created by using the command graph = Graph()
Here is what I did from the very beginning:
I open Neo4j Desktop (v. 1.3.11), create a new project, and then create a new database:
add database > create a local database
DBMS Name: Neo4j
Password: Neo4j
Then I start it and then I click on open, so that the Neo4j browser opens and it connects to the database.
Since I see the message that I am connected, I can go on.
I am using Anaconda as prompt.
I type python
to activate the python shell, and the output is:
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
I type:
from py2neo import Graph
and then
graph = Graph()
But then the prompt returns:
Traceback (most recent call last):
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 450, in acquire
cx = self._free_list.popleft()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\database\__init__.py", line 358, in __init__
self.service = GraphService(profile, **settings)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\database\__init__.py", line 189, in __init__
self._connector = Connector(profile, **connector_settings)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 603, in __init__
self.add_pools(self._profile)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 631, in add_pools
on_broken=self._on_broken)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 316, in open
seeds = [pool.acquire() for _ in range(init_size or cls.default_init_size)]
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 316, in <listcomp>
seeds = [pool.acquire() for _ in range(init_size or cls.default_init_size)]
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 460, in acquire
on_broken=lambda msg: self.__on_broken(msg))
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\__init__.py", line 118, in open
on_release=on_release, on_broken=on_broken)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\bolt.py", line 213, in open
bolt._hello()
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\bolt.py", line 653, in _hello
self._audit(response)
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\bolt.py", line 626, in _audit
task.audit()
File "C:\Applicazioni_Tommaso\Phyton\lib\site-packages\py2neo\client\bolt.py", line 1062, in audit
raise self._failure
py2neo.database.work.ClientError: [Security.Unauthorized] The client is unauthorized due to authentication failure.
I see that the problem is due to security reasons, so I tryed with
graph = Graph("bolt://localhost:7687", user="Neo4j", password="Neo4j")
But I get the same error. What is wrong?