-
Notifications
You must be signed in to change notification settings - Fork 356
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
Unexpected error on zappa update - ImproperlyConfigured: Error loading psycopg2 or psycopg module on AWS #1260
Comments
Update, how I made it work after 4 hours:
|
I was reviewing my actions last evening, and although I've managed to recover, it wasn't because I discovered the root cause. I'm reopening the issue for wider consideration, maybe some extra debugging is possible for everyone to benefit if this event happens again. |
I assume that this problem occurred due to the latest version of |
This is a very good insight. Is it possible to add a check and fail the update command if the manylinux wheel is not available and architecture of the machine is not x64? |
That's a good point. At the moment the lambda package is built on the system where the command is run. In addition, we do allow deployment to docker, so that would need to be taken into consideration. (Since a docker deployment could potentially support the case where the expected 'wheel' is not available. |
When I pin this packages, it works on my end. |
Context
I was pushing a minor code update to a zappa managed Django site.
The site was operating normally until the update.
On the update I got the following error
When running zappa tail production i found the following error:
During the preparation of the deployment i don't see that psycopg2-binary is loaded from manylinux wheel.
The only change i've made was updating to MacOS Ventura 13.5 yesterday. But I'm using homebrew python.
Expected Behavior
zappa update production should properly deploy the application and run it, since no library changes were made
Actual Behavior
Deployment results in an error
ImproperlyConfigured: Error loading psycopg2 or psycopg module
Possible Fix
No idea
Steps to Reproduce
Can't be sure that this reproduces, but this is my setup:
Have a lambda django application configured to connect to postgress database backend
On MacOS Ventura 13.5 have a Homebrew Python 3.8 install, running in virtual environment for the code
try a
zappa update
of the running code.Your Environment
zappa -v 0.57.0
pip freeze
:https://www.beyondmachines.net/
zappa_settings.json
:The text was updated successfully, but these errors were encountered: