5👍
✅
This error occurs when uwsgi and psycopg are compiled against two different openssl versions.
You have two solution.
-
disable ssl of django database configuration
# Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mydb', 'USER': 'myuser', 'PASSWORD': 'mypassword', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': { 'sslmode': 'disable' } } }
- Install psyocpg2 from source instead of wheel
to install psyocpg2 from source you have to uninstall previous one and try this
pip uninstall psycopg2
pip install --no-binary :all: psycopg2
Source:stackexchange.com