Goofball
Goofball

Reputation: 755

Trust On First Use in BOLT Neo4j driver for python - how to make the code run

I'm using PyCharm 2016.1.4 and an example from the neo4j manual. I'm wondering how to use the TRUST_ON_FIRST_USE in the expression. It's not recognized by pycharm as a valid entry. Placing it between " " or ' ' also did not resolve the issue. What do I miss here?

driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth("neo4j", "password"), encrypted=True, trust=TRUST_ON_FIRST_USE)

With " " or ' ': TypeError: unorderable types: str() >= int()
Without " " or ' ' : NameError: name 'TRUST_ON_FIRST_USE' is not defined

Upvotes: 0

Views: 235

Answers (2)

Chiru Koudik
Chiru Koudik

Reputation: 11

In python3 TRUST_ON_FIRST_USE is deprecated.

Instead use TRUST_ALL_CERTIFICATES.

Upvotes: 1

Nigel Small
Nigel Small

Reputation: 4495

You presumably need to include:

from neo4j.v1 import TRUST_ON_FIRST_USE

Upvotes: 1

Related Questions