title: py2neo connection error (authentication error)
body: <p>I've been trying to connect to neo4j, authenticate and create nodes with various properties. neoj is working fine in <a href="http://localhost:7474/" rel="nofollow noreferrer">http://localhost:7474/</a>. I've subbed mypassword in for my actual password below (I'm pretty sure its not a password issue as I've connected to neo4j through cmd prompt)</p>
  
  <pre><code>import py2neo
  from py2neo import authenticate,Graph, Node
  
  def creatNodeWithLabelProperties():
      print("Start - Creating Node with Label and Properties")
  
      # Authenticate the user using py2neo.authentication
  
      py2neo.authenticate("localhost:7474", "neo4j", "mypassword")
  
      # Connect to Graph and get the instance of Graph
  
      graph = Graph("http://localhost:7474/db/data/")
  
  
      node1 = Node("FirstLabel", name="MyPythonNode1", neo4j_version="2.2")
  
      node2 = Node("FirstLabel", "SecondLabel",name="MyPythonNode2", neo4j_version="2.2")
  
      resultNodes = graph.create(node1, node2)
  
      for index in range(len(resultNodes)):
          print("Created Node - ", index, ", ", resultNodes[index])
      print("End - Creating Node with Label and Properties")
  
  
  def createNodeWithLabelPropertiesWithCast():
      print("Start - Creating Node with Label and Properties")
  
      py2neo.authenticate("localhost:7474", "neo4j", "mypassword")
  
      graph = Graph("http://localhost:7474/db/data/")
      #Define a LIST of Labels
      labels = [ 'FirstLabel' ,'SecondLabel' ]
      #Define a DICTIONARY
      properties = {'name':'MyPythonNode2', 'neo4j_version':'2.2'}
      #CAST the node and invoke graph.create method.
      node = Node.cast(labels,properties)
      resultNode, = graph.create(node)
      print("Node - ", resultNode)
  
      print("End - Creating Node with Label and Properties")                                  
  
  if __name__ == '__main__':
      print("Start Creating Nodes")
      creatNodeWithLabelProperties
      createNodeWithLabelPropertiesWithCast()
      print("End Creating Nodes")      
  </code></pre>
  
  <p>The error I get is as follow, can anyone kindly help?</p>
  
  <pre><code>Start Creating Nodes
  Start - Creating Node with Label and Properties
  Traceback (most recent call last):
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\database\__init__.py", line 318, in __new__
      inst = cls.__instances[key]
  KeyError: (&lt;class 'py2neo.database.Graph'&gt;, &lt;ServerAddress settings={'host': 'localhost', 'http_port': 7474}&gt;, 'data')
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\database\http.py", line 154, in get
      response = self.__base.get(headers=headers, redirect_limit=redirect_limit, **kwargs)
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\packages\httpstream\http.py", line 966, in get
      return self.__get_or_head("GET", if_modified_since, headers, redirect_limit, **kwargs)
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\packages\httpstream\http.py", line 943, in __get_or_head
      return rq.submit(redirect_limit=redirect_limit, **kwargs)
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\packages\httpstream\http.py", line 452, in submit
      return Response.wrap(http, uri, self, rs, **response_kwargs)
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\packages\httpstream\http.py", line 489, in wrap
      raise inst
  py2neo.packages.httpstream.http.ClientError: 401 Unauthorized
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "CreateNode.py", line 53, in &lt;module&gt;
      createNodeWithLabelPropertiesWithCast()
    File "CreateNode.py", line 38, in createNodeWithLabelPropertiesWithCast
      graph = Graph("http://localhost:7474/db/data/")
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\database\__init__.py", line 327, in __new__
      use_bolt = version_tuple(inst.__remote__.get().content["neo4j_version"]) &gt;= (3,)
    File "C:\Users\OdhranH7\AppData\Local\Programs\Python\Python36\lib\site-packages\py2neo\database\http.py", line 157, in get
      raise Unauthorized(self.uri.string)
  py2neo.database.status.Unauthorized: http://localhost:7474/db/data/
  </code></pre>