-
Notifications
You must be signed in to change notification settings - Fork 368
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
Upgrading Django to 4.2 crashes the zappa based deployment with Error 500 #1230
Comments
The solution in my PR could be to set the value of |
Please share if the PR is merged in a new release and whether I need to configure something in order for the process to run properly for Django 4.2+ |
Yes of course, let's wait for a review from the maintainer. The following lines are not a solution, just a temporary workaround!If you need it ASAP, then just switch your requirements line from
to
So you can test it with Django 4.2 (and eventually provide another feedback other than mine) |
Great, task for the weekend. |
Ref #1230 - https://docs.djangoproject.com/en/4.2/releases/4.2/#miscellaneous - https://wsgi.readthedocs.io/en/latest/definitions.html#envvar-wsgi.input > Manually instantiated WSGIRequest objects must be provided > a file-like object for wsgi.input. Co-authored-by: monkut <[email protected]>
@dennybiasiolli I'm building a new project with Django 4.2 and I'm facing the same error mentioned in the thread. I wanted to try out the updated package using Here's the error I'm getting:
|
@symbiot-india my pull request has been approved and merged into Zappa:master, so you can use the official zappa repo with |
Thanks! I will try this out. |
Great, it's working now with Django 4.2! Thanks Denny |
Fixed for me as well. Thank you. |
Fixed in 0.57.0 release, published to pypi 5/19, closing. |
Ref zappa#1230 - https://docs.djangoproject.com/en/4.2/releases/4.2/#miscellaneous - https://wsgi.readthedocs.io/en/latest/definitions.html#envvar-wsgi.input > Manually instantiated WSGIRequest objects must be provided > a file-like object for wsgi.input. Co-authored-by: monkut <[email protected]>
Context
I am running a Django web application as Lambda deployed on AWS via zappa
I upgraded Django to 4.2 on my application to remedy security issues reported by Github Dependabot.
Local testing didn't reveal any issues.
After upgrading i ran
zappa update production
and the deployment failed, with zappa deployment reporting error 500 upon deployment.In the zappa log i found the following error:
'NoneType' object has no attribute 'read'
I found another comment on Django forums that's closed as Django making a breaking change that requires changes in the way WSGIRequest is invoked
https://code.djangoproject.com/ticket/34350
At this moment I reverted back to Django 4.1.8 for the application to run.
Is there any proper upgrade path of libraries to make Django 4.2 work?
Expected Behavior
Upgrading Django and redeployment via zappa should be trivial. Previously I have done this many times.
On local testing everything is working properly.
Actual Behavior
Error 500 on redeployment through Zappa, and in the zappa log the following error:
'NoneType' object has no attribute 'read'
Possible Fix
Revert back to Django 4.1.8 for the application to run. This will make sense in the short term, but I'm looking for a long term fix.
Steps to Reproduce
zappa update application
zappa tail application
logs one can see "NoneType' object has no attribute 'read'"Your Environment
pip freeze
:zappa_settings.json
:The text was updated successfully, but these errors were encountered: