Closed jneves closed 2 years ago
I'm experiencing this issue follow the most basic guide ever:
https://blog.logrocket.com/zappa-and-aws-lambda-for-serverless-django/
argcomplete==1.12.3
asgiref==3.3.4
boto3==1.17.66
botocore==1.20.66
certifi==2020.12.5
cfn-flip==1.2.3
chardet==4.0.0
click==7.1.2
Django==2.2.21
durationpy==0.5
future==0.18.2
hjson==3.0.2
idna==2.10
importlib-metadata==4.0.1
jmespath==0.10.0
kappa==0.6.0
pep517==0.10.0
pip-tools==6.1.0
placebo==0.9.0
python-dateutil==2.8.1
python-slugify==5.0.0
pytz==2021.1
PyYAML==5.4.1
requests==2.25.1
s3transfer==0.4.2
six==1.16.0
sqlparse==0.4.1
text-unidecode==1.3
toml==0.10.2
tqdm==4.60.0
troposphere==2.7.1
typing-extensions==3.10.0.0
urllib3==1.26.4
Werkzeug==0.16.1
wsgi-request-logger==0.4.6
zappa==0.52.0
zipp==3.4.1
{
"dev": {
"django_settings": "amazing.settings",
"profile_name": "default",
"project_name": "amazing",
"runtime": "python3.7",
"s3_bucket": "zappa-bbbolcxgn",
"aws_region": "us-east-1"
}
}
[START] RequestId: 3e04d5ec-4550-4f8e-84ad-85fe9d1a0684 Version: $LATEST
[DEBUG] 2021-05-05T15:48:19.990Z 3e04d5ec-4550-4f8e-84ad-85fe9d1a0684 Zappa Event: {'manage': 'shell'}
[ERROR] RuntimeError: populate() isn't reentrant
Traceback (most recent call last):
File "/var/task/handler.py", line 609, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 243, in lambda_handler
return handler.handler(event, context)
File "/var/task/handler.py", line 404, in handler
app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS)
File "/var/task/zappa/ext/django_zappa.py", line 20, in get_django_wsgi
return get_wsgi_application()
File "/var/task/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/var/task/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/var/task/django/apps/registry.py", line 83, in populate
raise RuntimeError("populate() isn't reentrant")
This is a sign that something is not configured correctly in django. Make sure you can runserver locally with django.
closing old migrated issue.
Originally from: https://github.com/Miserlou/Zappa/issues/2165 by rafrasenberg
I am trying to deploy a Django project with Zappa and a PostgreSQL database on Amazon AWS RDS but I am running into this error:
Pretty meaningless error. I google'd this and tried some of the solutions in other tickets but could not resolve this. I tried
psycopg2
andpsycopg2-binary
but both no luck. Did anyone ever solve this? Because all the articles/issues covering this are old and outdated.Zappa settings:
The DB command:
Pip freeze: