neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
936 stars 231 forks source link

Neomodel trying to connect to localhost, even if the database is on Aura ( When calling NODE_NAME.nodes.all() ) #787

Closed tseren1218 closed 3 months ago

tseren1218 commented 5 months ago

Expected Behavior (Mandatory)

NODE_NAME.nodes.all returning all the nodes

Actual Behavior (Mandatory)

Couldn't connect to localhost:7687 (resolved to ()): Failed to establish connection to ResolvedIPv6Address(('::1', 7687, 0, 0)) (reason [WinError 10061] No connection could be made because the target machine actively refused it) Failed to establish connection to ResolvedIPv4Address(('127.0.0.1', 7687)) (reason [WinError 10061] No connection could be made because the target machine actively refused it)

How to Reproduce the Problem

Create a form class. Inside that, try to call NODE_NAME.nodes.all():

class ConnectedLocationsForm(forms.Form): connected_locations: Location.nodes.all()

Any statement

  . . . . . 

Simple Example

Create a form class. Inside that, try to call NODE_NAME.nodes.all():

class ConnectedLocationsForm(forms.Form): connected_locations: Location.nodes.all()

Any statement

  . . . . . 

Datasets and Statements

Screenshots (where it's possibile)

Specifications (Mandatory)

Currently used versions

Versions

curious-broccoli commented 5 months ago

you should probably share what you set your config to:

from neomodel import config
config.DATABASE_URL = 'bolt://neo4j:neo4j@localhost:7687'
mariusconjeaud commented 4 months ago

I agree please share how you initiate the connection, either through config.DATABASE_URL, or db.set_connection