# Unable to connect to py2neo package

**URL:** <https://community.neo4j.com/t/unable-to-connect-to-py2neo-package/48810>\
**Category:** Installation\
**Tags:** connection\
**Created:** [December 10, 2021, 10:28am UTC](https://community.neo4j.com/t/unable-to-connect-to-py2neo-package/48810 "2021-12-10T10:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DMF194](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dmf194/32/20924_2.png) [@DMF194](https://community.neo4j.com/u/DMF194)\
**Post date:** [December 10, 2021, 10:28am UTC](https://community.neo4j.com/t/unable-to-connect-to-py2neo-package/48810/1 "2021-12-10T10:28:47Z")

</div>

Hi everyone,

I realized a problem concerning py2neo package used with Python vr3.5+

I did the following for neo4j package authentication:

```auto
GraphDatabase.driver("bolt://localhost:7867", "neo4j", "password") 

```

But for py2neo package, when feeding in the same arguments for authentication:

```auto
Graph("bolt://localhost:7867", auth=("neo4j", "password"))

```

It's getting an error:  
IndexError: pop from an empty deque

With another error exception:  
Client Error: [Security.Unauthorized] The client is unauthorized due to authentication failure.

Tried multiple older versions of py2neo 2020.0.0 but yield similar results.

Accepting all suggestions here

---

<div class="post-metadata">

**Author:** ![tfontanella011](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tfontanella011/32/16879_2.png) [@tfontanella011](https://community.neo4j.com/u/tfontanella011)\
**Post date:** [December 15, 2021, 12:49am UTC](https://community.neo4j.com/t/unable-to-connect-to-py2neo-package/48810/2 "2021-12-15T00:49:14Z")

</div>

Hi @DMF194 ,

This seems to be an authentication/password issue. Please verify your user/password credentials are correct. If you don't remember admin username (ie:neo4j), you can find how to reset the password [here](https://neo4j.com/docs/operations-manual/current/configuration/password-and-user-recovery/).

Hope this helps

---

<div class="post-metadata">

**Author:** ![DMF194](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dmf194/32/20924_2.png) [@DMF194](https://community.neo4j.com/u/DMF194)\
**Post date:** [December 15, 2021, 1:52am UTC](https://community.neo4j.com/t/unable-to-connect-to-py2neo-package/48810/3 "2021-12-15T01:52:01Z")

</div>

Hi @tfontanella011 ,

Thanks for clarity.

As I have mentioned, I have used the exact same password authentication to connect to Neo4j instance using the neo4j package for python driver and it works.

But when I try to connect using py2neo, it seems to be able to sense the connection but it does not want to.
