Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: no module named asgiref #71

Closed
corentinbettiol opened this issue Sep 13, 2023 · 6 comments
Closed

Error: no module named asgiref #71

corentinbettiol opened this issue Sep 13, 2023 · 6 comments
Assignees

Comments

@corentinbettiol
Copy link

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
Copy link
Contributor

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
Copy link
Author

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

@LilyFoote
Copy link
Contributor

In that case, try installing asgiref.

@corentinbettiol
Copy link
Author

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
Copy link
Contributor

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

@corentinbettiol
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants