Unable to start Django app in docker with Daphne

  daphne, django, docker, python

I was setting up Django app in docker with gunicorn + nginx + daphne. But I’m not able to get the app running with daphine error log showing this:

Traceback (most recent call last):
File "/usr/local/bin/daphne", line 8, in <module>
sys.exit(CommandLineInterface.entrypoint())
File "/usr/local/lib/python3.6/dist-packages/daphne/cli.py", line 191, in entrypoint
cls().run(sys.argv[1:])
File "/usr/local/lib/python3.6/dist-packages/daphne/cli.py", line 252, in run
application = import_by_path(args.application)
File "/usr/local/lib/python3.6/dist-packages/daphne/utils.py", line 12, in import_by_path
target = importlib.import_module(module_path)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 991, in _gcd_import
File "<frozen importlib._bootstrap>", line 930, in _sanity_check
ValueError: Empty module name

Any idea what can be causing this error and any possible solution?

Source: Docker Questions

LEAVE A COMMENT