kolofordjango / kolo

See everything happening in your running Django app. All without leaving VSCode
https://kolo.app
486 stars 14 forks source link

Error: no module named asgiref #71

Closed corentinbettiol closed 10 months ago

corentinbettiol commented 10 months ago

Here's the error I got after adding Kolo to one of my projects in order to try it:

  File "/home/me/projects/project-name/.venv/lib/python3.9/site-packages/kolo/middleware.py", line 9, in <module>
    from asgiref.sync import iscoroutinefunction
ModuleNotFoundError: No module named 'asgiref'
LilyFoote commented 10 months ago

This is strange - asgiref is a dependency of Django, so you should have it installed if you're using the middleware. Can you show me the output of pip list?

corentinbettiol commented 10 months ago

I'm still using django 2.2 on this project, which did not include asgiref.

LilyFoote commented 10 months ago

In that case, try installing asgiref.

corentinbettiol commented 10 months ago

Yes I added asgiref manually and now it's still not working but for other reasons (see #72) :)

You may want to add it to the requirements of the kolo package since people may want to use it with old django projects :)

LilyFoote commented 10 months ago

I've added the dependency. It'll be in the next release.

corentinbettiol commented 10 months ago

Thanks!