-
Notifications
You must be signed in to change notification settings - Fork 217
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
Static Files Error With The Latest Version (3.3.2) #251
Comments
@StingBolt Can you paste the full traceback please? Also can you say if you're using this just with Django or with Channels or with..., and so on? — Context is all here. 🙂 Thanks Related django/django#14221 |
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 |
I'm not familiar with REST framework code there, but the issue can be related to how See this SO answer for details - https://stackoverflow.com/a/52422903. Got a related bug in another library today - datadvance/DjangoChannelsGraphqlWs#68 |
I've seen this bug in Quart (I think), here is a fix |
Quart code:
...however I'm encountering this issue even with Python 3.9.1 |
On Python < 3.8 a functool.partial is not detected as async function, which is due to a bug in inspect module, see https://bugs.python.org/issue33261 This commit adds a proper type check for earlier Python versions and fixes django#251.
On Python < 3.8 a functool.partial is not detected as async function, which is due to a bug in inspect module, see https://bugs.python.org/issue33261 This commit adds a proper type check for earlier Python versions and fixes django#251.
On Python < 3.8 a functool.partial is not detected as async function, which is due to a bug in inspect module, see https://bugs.python.org/issue33261 This commit adds a proper type check for earlier Python versions and fixes django#251.
On Python < 3.8 a functool.partial is not detected as async function, which is due to a bug in inspect module, see https://bugs.python.org/issue33261 This commit adds a proper type check for earlier Python versions and fixes #251.
The issue is fixed on |
On Python < 3.8 a functool.partial is not detected as async function, which is due to a bug in inspect module, see https://bugs.python.org/issue33261 This commit adds a proper type check for earlier Python versions and fixes django#251.
This bug is not resolved for me despite upgrading to 3.3.3. Python 3.8.6 It looks like a lambda created by daphne at https://github.com/django/daphne/blob/main/daphne/server.py#L206 is what eventually ends up in https://github.com/django/asgiref/blob/main/asgiref/sync.py#L120 as |
Yup, I think you're right. I'm going to go change the error to a warning for now, async functions are too hard to reliably detect in Python. |
3.3.4 is out which replaces this error with a warning, so your applications will still run. We'll have to figure out how to get that Daphne lambda to "look async", or maybe just abandon the whole idea of detecting coroutine-yielding callables before the fact entirely. |
Hey @andrewgodwin — thanks for your work on this! This all went very quickly yesterday, and with the Django 3.2 release I didn't have the bandwidth to follow totally. I was looking at a quick release for Daphne today, but with asgiref 3.3.4 out, I will take a few days to fully work through it, and look to release next week.
We have django/daphne#364 proposed, to use a |
Yes, let's take the time and do this properly. Given we know that |
There seems to be something wrong with serving static files in the latest version, this is the error:
The previous version (3.3.1) works perfectly
The text was updated successfully, but these errors were encountered: