Static Files Error With The Latest Version (3.3.2)
See original GitHub issueThere seems to be something wrong with serving static files in the latest version, this is the error:
raise TypeError("async_to_sync can only be applied to async functions.")
TypeError: async_to_sync can only be applied to async functions.
HTTP GET /static/rest_framework/js/default.js 500 [1.01, 127.0.0.1:50017]
The previous version (3.3.1) works perfectly
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Django channels error when attempting to serve static files ...
I added asgiref==3.2.10 to my requirements.txt file and it seems to have solved the problem.
Read more >Daphne raises Internal Server Error when accessing static ...
This error raises every time a file from static folder is accessed. What would be a proper way for debugging this? I've got...
Read more >Static File Errors With New Version of Django - YouTube
Django recently updated to version 3.1 and now we need to make a change to our settings.py file to deal with our static...
Read more >Try Django 1.9 - 25 of 38 - Setup Static Files - CSS ... - YouTube
... of 38 - Setup Static Files - CSS & Javascript & Images in Django** Try Django 1.9 ** is an introduction to...
Read more >Django Static Files Handling made Simple - DataFlair
First, create a new folder template in the home app. Inside that folder, create two new files, base.html, and others.html. Then just paste...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also just ran into this issue, same error message:
(In my case, using Django 3.1.7, asgiref 3.3.2, python 3.9.2 and channels 3.0.3, and downgrading to 3.3.1 fixes it here too)
Oh, and the error also happens if I disable channels and only use django’s
get_asgi_application()
Yes, let’s take the time and do this properly. Given we know that
partial
works and is accounted for in both python and asgiref, I think I’d go with that?