Category "psycopg2"

psycopg2.OperationalError: could not translate host name "<address>" to address: Temporary failure in name resolution

I have looked through similar posts on SO and they seem to be specific to using Docker environments and haven't been much helpful. Ours is a little different, w

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres

I'm trying to connect to a Postgres database with SQLAlchemy. I've installed psycopg2. However, I get the error sqlalchemy.exc.NoSuchModuleError: Can't load plu

how to pass asc desc as params in python psycopg2 raw sql execution?

i have a sample query template to accept dynamic parameters to execute: ps_conn = psycopg2.connect(...) ps_cursor = ps_conn.cursor() ps_cursor.execute(''' S

AWS other modules cant be imported as soon as psycopg2 module is installed

I have installed some python libraries ands added them to a layer of a function. I have got the error which said "errorMessage": "No module named 'psycopg2'" So

Glue 3.0 has Psycopg2 but "No module named 'psycopg2._psycopg'"?

I'm using AWS Glue 3.0 and am trying to connect to Redshift using Psycopg2. At first I was uploading a whl file version of it and it would give me the error abo

Failing to install psycopg2-binary on new docker container

I have encountered a problem while trying to run my django project on a new Docker container. It is my first time using Docker and I can't seem to find a good w

psycopg2: Can't adapt type 'UUID'?

I am using psycopg2 to try to insert an entry into a table where the type of the data is the Postgres type 'uuid'. According to this page, I should be able to

Apple M1: install psycopg2 package Symbol not found: _PQbackendPID

pg_config venv ❯ which pg_config /Applications/Postgres.app/Contents/Versions/latest/bin/pg_config pip3 install -r requirements.txt requirements.txt

Python Postgres Package: psycopg2 copy_from vs copy_expert

Requirement: To load millions of rows into a table from S3 using Python and avoid memory issue I see there are two methods psycopg2's copy_from and copy_expert

Integer out of range when inserting large number of rows to postgress

I have tried multiple solutions and way around to solve this issue, probably something is still I am missing. I want to insert a list of values to my database.

Postgresql/psycopg2 password authentication error even though user and password are correct

I am new to web development in Python and would really appreciate some help. I am trying to set up psycopg2/peewee on WSL (Windows machine). In my Python code I

Postgres 9.5 upsert command in pandas or psycopg2?

Most of the examples I see are people inserting a single row into a database with the ON CONFLICT DO UPDATE syntax. Does anyone have any examples using SQLAlch

How to create a temporary table by passing in data to psycopg2?

I have a pandas dataframe that I want to pass into a psycopg2 execute statement as a temporary table. This should be very simple: pseudo-code... string = """

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