Skip to content

cassandra.cqlengine.CQLEngineException: Connection name '<object object at 0x7eff59dcc8e0>' doesn't exist in the registry. #82

@n1207n

Description

@n1207n

Hi! I'm experiencing an issue where django-cassandra-engine stops working due to new Cython version not being compatible with cassandra-driver python package. I looked around the web a bit, and it suggests to me that Cython version needs to be 0.24.1, as Cython 0.25 breaks the cassandra-driver.

Thankfully, Datastax team released a new version of cassandra-driver: 3.7.1, and Cython issue is gone but now I'm having a new issue.

All I can speculate from your code and cassandra-driver codebase is that your connection.get_session() no longer works as cassandra-driver's _connections dictionary is empty at the point of failure.

I spent the whole day to burn and crash therefore, any solution or advice would be really appreciated ;)

The below is the traceback from my Docker environment.

Thanks!!!

Traceback (most recent call last):
File "/code/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 327, in execute
django.setup()
File "/usr/local/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/local/lib/python2.7/site-packages/django_cassandra_engine/models/init.py", line 5, in
conn.connect()
File "/usr/local/lib/python2.7/site-packages/django_cassandra_engine/base/init.py", line 104, in connect
self.connection = CassandraConnection(**settings)
File "/usr/local/lib/python2.7/site-packages/django_cassandra_engine/connection.py", line 58, in init
self.setup()
File "/usr/local/lib/python2.7/site-packages/django_cassandra_engine/connection.py", line 62, in setup
self.session = connection.get_session()
File "/usr/local/lib/python2.7/site-packages/cassandra/cqlengine/connection.py", line 293, in get_session
conn = get_connection(connection)
File "/usr/local/lib/python2.7/site-packages/cassandra/cqlengine/connection.py", line 190, in get_connection
raise CQLEngineException("Connection name '{0}' doesn't exist in the registry.".format(name))
cassandra.cqlengine.CQLEngineException: Connection name '<object object at 0x7eff59dcc8e0>' doesn't exist in the registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions