question-mark
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.

uvicorn 0.2 not compatible with django channels

See original GitHub issue

daphe server for a project(avilpage) can be started with

daphne avilpage.asgi:application                                         

uvicorn fails with

->uvicorn avilpage.asgi:application
Usage: uvicorn [OPTIONS] APP

Error: Error loading ASGI app. Could not import module "avilpage.asgi".

eventhough

python -c 'import avilpage.asgi'                     

works fine without any errors.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ChillarAnandcommented, Jul 4, 2018

Working fine with uvicorn==0.2.4. Thanks.

0reactions
tomchristiecommented, Jul 4, 2018

Setting PYTHONPATH would resolve your issue. Resolved in 0.2.4, where we automatically add the current directory to the PYTHONPATH. (I’ve checked this against how daphne handles the app import)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django Channels Daphne uvicorn - Stack Overflow
I just want to know if uvicorn can be used with Django Channel, but uvicorn is not necessary. – dudulu. Aug 4, 2021...
Read more >
uvicorn - PyPI
Uvicorn is an ASGI web server implementation for Python. ... server implementation, originally developed to power Django Channels, is the Daphne webserver.
Read more >
ASGI Documentation
This document proposes a standard interface between network protocol servers (particularly web servers) and Python applications, intended to allow handling of ...
Read more >
preparing metadata (setup.py) ... error - You.com | The search ...
Hi,. On an other install the pyminifier is one of it's dependicies. My install is exited during a failing install of pyminifier. See...
Read more >
How to use Django with Uvicorn
Uvicorn is an ASGI server based on uvloop and httptools , with an emphasis on speed. Installing Uvicorn¶. You can install Uvicorn with...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found