Module lock error when starting development server

487 views
Skip to first unread message

Jonty Needham

unread,
Jun 11, 2019, 10:37:18 AM6/11/19
to django...@googlegroups.com
Stuck. If anyone has ideas that would be brilliant.

Django 2.2, running on Ubuntu 18.04 in a venv

$ python manage.py runserver

Exception in thread django-main-thread:                                    
Traceback (most recent call last):                                
  File "/home/jonty/.virtualenvs/tdj_playground/lib/python3.6/site-packages/django/template/utils.py", line 66, in
 __getitem__                                                                  
    return self._engines[alias]                                                                                   KeyError: 'django'

and then another error, leading down finally to:
...
 File "<frozen importlib._bootstrap>", line 968, in _find_and_load
  File "<frozen importlib._bootstrap>", line 149, in __enter__
  File "<frozen importlib._bootstrap>", line 94, in acquire
_frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('django.test.signals') at 139670284457464

Thanks in advance for any help.

James Farris

unread,
Jun 11, 2019, 4:06:09 PM6/11/19
to Django users
Do you have a venv running in another venv?

You could try installing and running gdb https://wiki.python.org/moin/DebuggingWithGdb

It may give you more insight. But Deadlocking is essentially one python process clobbering another causing the app to lock up.

Reply all
Reply to author
Forward
0 new messages