Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named 'asgiref.sync'

See original GitHub issue

When I build deepqa:latest image, from the root directory:

docker build -t deepqa:latest .

get error:

 ---> Running in 76634673f149
Traceback (most recent call last):
  File "", line 22, in <module>
  File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 371, in execute_from_command_line
  File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 347, in execute
  File "/usr/local/lib/python3.5/site-packages/django/", line 24, in setup
  File "/usr/local/lib/python3.5/site-packages/django/apps/", line 120, in populate
  File "/usr/local/lib/python3.5/site-packages/channels/", line 17, in ready
  File "/usr/local/lib/python3.5/site-packages/channels/", line 10, in monkeypatch_django
    from .management.commands.runserver import Command as RunserverCommand
  File "/usr/local/lib/python3.5/site-packages/channels/management/commands/", line 12, in <module>
    from channels.routing import get_default_application
  File "/usr/local/lib/python3.5/site-packages/channels/", line 9, in <module>
    from channels.http import AsgiHandler
  File "/usr/local/lib/python3.5/site-packages/channels/", line 17, in <module>
    from asgiref.sync import async_to_sync, sync_to_async
ImportError: No module named 'asgiref.sync'
The command '/bin/sh -c python3 makemigrations' returned a non-zero code: 1

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

rahul6612commented, Mar 17, 2018

your channel version is latest so install the latest version of asgiref

pip install asgiref==2.2.0

aswiniS2commented, Jun 6, 2018

I have installed latest version of channels and asgiref, but still I am getting that error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django Channels No module named 'asgiref.sync' error
your channel version is latest so install the latest version of asgiref, try: pip install asgiref==3.1.2.
Read more >
No module named 'asgiref.sync'_蔡坚立的博客
I found out the problem was with old version of asgiref I just had to update django and it updated also the asgiref...
Read more >
no module named django / python import error (If Installed / If ...
Fix ModuleNotFoundError ( no module named django) Python Import Error (If Installed / If Exists)#python #error #fix #fixed #howto Hey guys in ...
Read more >
no module named 'six' - OSCHINA - 中文开源技术交流社区
Django——ModuleNotFoundError: No module named 'asgiref.sync'. Django+channels运行时报错Unhandled exception in ...
Read more >
GeoNode/general - Gitter
... File "", line 28, in <module> from import execute_from_command_line ImportError: No module named
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found