-
Notifications
You must be signed in to change notification settings - Fork 152
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
STORAGES results in Server Error 500 #561
Comments
We need the stack trace to debug the error. It should be in your logs or can be captured with a tool like Sentry. One possibility is you have a reference to a non-existent static file, which unfortunately doesn't error in debug mode. |
I can give you the info from 'Inspect", the console output of my web browsers: GET | Response Headers: HTTP/2 500 Request Headers: GET / HTTP/2 The logs on render.com do not show an error, it happily deployed the django app without a hiccup. Before putting in the STORAGES settings (as described above) the problem was access to the CSS files was blocked due to the type mismatch (expected: "text/css", got "text/html"). Now the browsers (Firefox and Vivaldi) cannot find the website at all. |
What is needed is the detailed Python traceback from the server logs, not just «500 error» that the client sees. |
I'm having the same issue, I can provide what you're looking for: Django Version4.2 Python Version3.11 Whitenoise version6.6.0 ` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
@BlauweStadTechnologieen Are you sure that your issue is related to whitenoise ?? According to your logs, the issue is about your templates. Whitenoise doesn't even ship anything with a tag "content" |
Who knows? |
I am facing this same issue and it's fixed using "whitenoise.storage.CompressedStaticFilesStorage" instead of "whitenoise.storage.CompressedManifestStaticFilesStorage". Any updates on it? |
This means you don’t provide the manifest with the static file and therefore whitenoise can not find it |
In my case the problem had a very simple solution. In the template, I had to remove the beginning slash: |
Python Version
3.11
Django Version
5.0
Package Version
6.6.0
Description
Django web application running on render.com.
Switching from:
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
to:
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
results in blank screen with HTTP Status code 500
The text was updated successfully, but these errors were encountered: