cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Null connection from django_neomodel

Hi

I am doing my best to use Django in the creation of this website to reduce the time taken in the production of the model and the views. I appreciate if you can guide me to a more recent version than django_neomodel. I have tried before neo4jdjang and reached a dead-end both ways, recent version of neo4j not working with it, and older version of neo4j required by it is not working at all.

In django_neomodel, I achieved more steps in the compilation, until the install_labels steps, the connection is null object as shown in the following output:

</>
$ python3 manage.py install_labels
Setting up indexes and constraints...

Found django_neomodel.DjangoNode
! Skipping class django_neomodel.DjangoNode is abstract
Found qApp.models.Surah

  • Creating unique constraint for title on label Surah for class qApp.models.Surah
    Traceback (most recent call last):
    File "manage.py", line 22, in
    main()
    File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/django/core/management/ init .py", line 401, in execute_from_command_line
    utility.execute()
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/django/core/management/ init .py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/django_neomodel/management/commands/install_labels.py", line 12, in handle
    install_all_labels(stdout=self.stdout)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neomodel/core.py", line 70, in install_all_labels
    install_labels(cls, quiet=False, stdout=stdout)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neomodel/core.py", line 45, in install_labels
    db.cypher_query("CREATE CONSTRAINT "
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neomodel/util.py", line 27, in wrapper
    self.set_connection(config.DATABASE_URL)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neomodel/util.py", line 58, in set_connection
    self.driver = GraphDatabase.driver('bolt://' + hostname,
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neo4j/v1/api.py", line 94, in driver
    return Driver(uri, **config)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neo4j/v1/api.py", line 133, in new
    return subclass(uri, **config)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neo4j/v1/direct.py", line 73, in new
    pool.release(pool.acquire())
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neo4j/v1/direct.py", line 44, in acquire
    return self.acquire_direct(self.address)
    File "/Users/manal/Sites/q_venv/lib/python3.8/site-packages/neo4j/bolt/connection.py", line 455, in acquire_direct
    connection.pool = self
    AttributeError: 'NoneType' object has no attribute 'pool'
    </>

Please advise of solutions, workaround, or other libraries that can do what I am trying to do, graph database with python driver and web framework.

Here is the extra information that might help:

  • neo4j version, desktop version, browser version

Neo4j Browser version: 4.1.0
Neo4j Server version: 4.1.1 (community)
OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)

  • what kind of API / driver do you use

django version : 3.1.1

python neo4j-driver==1.6.3

neomodel==3.2.3

django_neomodel Version: 0.0.4

Summary: Use Neo4j with Django!

a sample of the data you want to import
Book: Words: Grammer: Meanings: Semantic Ontology of concepts connecting resources
Still to be designed once connection succeeds

  • which plugins / extensions / procedures do you use
  • neo4j.log and debug.log

neo4j.log in http://www.manalhelal.com/files/neo4j.log

debug.log in http://www.manalhelal.com/files/debug.log

Thank you very much for your support,

Manal

0 REPLIES 0