Category "psycopg2"

Could not translate host name "db" to address using Postgres, Docker Compose and Psycopg2

In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml. base.py: import psycopg2 conn = psycopg2.connect("dbname='base123' user='postgres'

Insert null values to postgresql timestamp data type using python

I am tying to insert null value to a postgres timestamp datatype variable using python psycopg2. The problem is the other data types such as char or int takes

Import error with psycopg2: symbol not found in flat namespace '_PQbackendPID'

Does anyone know how to fix this import error? I am working on macOS Monterey version 12.0.1. from psycopg2._psycopg import (# noqa ImportError: dlopen(/Users/m

How do I convert numpy NaN objects to SQL nulls?

I have a Pandas dataframe that I'm inserting into an SQL database. I'm using Psycopg2 directly to talk to the database, not SQLAlchemy, so I can't use Pandas b

Django 'pip install django-heroku'(psycopg2) error is blocking deployment to Heroku

I am setting up a new Django project to deploy on Heroku, however when I am following the Django Heroku deployment guide I come across an error during 'pip inst