Hello there DRF group!
I've following along the Django Rest Framework detailed tutorial to
understand the framework in depth. However, while doing so, I keep
encountering a DeadlockError which is as follows:
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/utils.py",
line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py",
line 917, in _bootstrap_inner
self.run()
File
"/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py",
line 865, in run
self._target(*self._args, **self._kwargs)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/utils/autoreload.py",
line 54, in wrapper
fn(*args, **kwargs)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/core/management/commands/runserver.py",
line 117, in inner_run
self.check(display_num_errors=True)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/core/management/base.py",
line 390, in check
include_deployment_checks=include_deployment_checks,
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/core/management/base.py",
line 377, in _run_checks
return checks.run_checks(**kwargs)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/core/checks/registry.py",
line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/contrib/admin/checks.py",
line 79, in check_dependencies
for engine in engines.all():
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/utils.py",
line 90, in all
return [self[alias] for alias in self]
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/utils.py",
line 90, in <listcomp>
return [self[alias] for alias in self]
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/utils.py",
line 81, in __getitem__
engine = engine_cls(params)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/backends/django.py",
line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/backends/django.py",
line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/backends/django.py",
line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/template/backends/django.py",
line 121, in get_package_libraries
module = import_module(entry[1])
File
"/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/rest_framework/templatetags/rest_framework.py",
line 12, in <module>
from rest_framework.renderers import HTMLFormRenderer
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/rest_framework/renderers.py",
line 19, in <module>
from django.test.client import encode_multipart
File "/Users/raunaq/Code/Learning/Python/Django/Tutorials/Django Rest
Framework/drf/env/lib/python3.7/site-packages/django/test/client.py", line
23, in <module>
from django.test import signals
File "<frozen importlib._bootstrap>", line 980, 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 4553097512
I encounter this error randomly when I change files or even if I just turn
of and run server again without any changes whatsoever. This is quite
annoying and is something that I would like to avoid when using DRF in
production. Any tips would be welcome!
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-rest-framework/f72540c1-d8b8-43d8-9b81-262caae5769b%40googlegroups.com.