psycopg2 Questions

3

Solved

Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgre...
Plash asked 4/11, 2019 at 11:51

1

The following statement_timeout option works on some Postgresql databases and on others, I get Unsupported startup parameter: options. Why? Is this possibly a difference between Postgres 9.4 and 9...
Cummerbund asked 28/7, 2017 at 19:21

3

Solved

I can confirm psycopg2 is install (using conda install -c anaconda psycopg2) but the it seems psycopg2 cannot be imported to my python script or the interpreter is unable to locate it. I also tried...
Demand asked 19/4, 2019 at 0:8

4

I installed psycopg2 in virtualenv using easy_install psycopg2. I did not see any errors and looks like installation went fine.. there is an egg file created in the site-packages dir for psycopg2.....
Spermophile asked 13/6, 2010 at 3:42

4

Solved

This is not that relevant so I'm just curious about the following (Python 2.7): I just began using psycopg and reading through the docs they always use strings (%s) and tuples for passing values t...
Dextrosinistral asked 23/1, 2015 at 22:59

9

Solved

How can I determine if a table exists using the Psycopg2 Python library? I want a true or false boolean.
Hermelindahermeneutic asked 9/12, 2009 at 14:2

1

How should I use psycopg2 with Flask? I suspect it wouldn't be good to open a new connection every request so how can I open just one and make it globally available to the application? from flask ...
Aplanatic asked 10/4, 2015 at 15:30

7

Solved

I want to insert a python dictionary as a json into my postgresql database (via python and psycopg2). I have: thedictionary = {'price money': '$1', 'name': 'Google', 'color': '', 'imgurl': 'http:...
Zagreus asked 3/8, 2015 at 20:37

14

Solved

I am following Heroku's tutorial to deploy a Django app: http://devcenter.heroku.com/articles/django#prerequisites. Everything is working fine until I get to this part: $ pip install Django psy...
Quintero asked 13/3, 2012 at 4:32

1

Solved

I am working on one Django project. And I decided to write logic code in PostgreSQL instead of writing in Python. So, I created a stored procedure in PostgreSQL. For example, a stored procedure loo...
Wile asked 14/7, 2021 at 16:35

3

Solved

I'm using Travis for CI/CD as part of my Django app, with a postgresql database. (Django 2.1.4) The build consistently fails on Travis as soon as the tests run. I receive this error: psycopg2.err...
Mecklenburg asked 29/5, 2019 at 7:49

2

Solved

This might be a rather silly question but what am I doing wrong here? It creates the table but the INSERT INTO doesn't work, I guess I'm doing something wrong with the placeholders? conn = psycopg...
Childlike asked 7/10, 2013 at 22:11

2

I am quite new to Python, we have an app container & a DB container. App container collects values like DB_HOST,PORT etc from CLI & try to create Tablespace on containerized Postgres DB run...
Rawlinson asked 22/6, 2021 at 13:3

3

When running a migration on my Flask app's postgres database I get the following psycopg2 error on an Enum type: INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime...
Hedi asked 26/9, 2017 at 7:45

3

Solved

I am inserting a list of dictionaries to a PostgreSQL database. The list will be growing quickly and the number of dict values (columns) is around 30. The simplified data: projects = [ {'name': 'pr...
Ibarra asked 1/3, 2019 at 14:32

2

Solved

New mackbookpro running Catalina. Installed anaconda using homebrew. Tried to install psycopg2 using the command conda install -c anaconda psycopg2 but failed due to package conflicts. Here's some ...
Arri asked 3/4, 2020 at 0:24

6

I'm trying to run Django with a Postgresql backend on my local Mac OS X. I've installed Django using pip: sudo pip install Django I've installed Postgresql with one of the binary installers here...
Lyly asked 12/4, 2012 at 21:40

4

Solved

I want to do " on conflict (time) do update set name , description " but I have no idea when I use stdin with csv , I don't know what name equal what? and description equal what... table_a: ...
Heterotrophic asked 29/12, 2017 at 7:56

2

I'm running an installation script that installs a number of different python packages. The one that is getting stuck on is psycopg2. The script attempts to install version 2.6.1. But I run into th...
Baggett asked 29/10, 2019 at 17:32

2

I try to truncate a table from a Python application using psycopg2. The operation returns -1 without either exception or any indication of a problem. The table is not truncated. The statement itsel...
Whence asked 1/7, 2019 at 12:6

3

Solved

I am trying to connect to Google Cloud SQL Postgres Using psycopg2. I have created an postgreSQL instance and using the default database postgres for now. I am able to connect from pgadmin tool as ...
Reformation asked 4/4, 2021 at 14:29

4

Solved

I'm trying to implement a server side cursor in order to "bypass" Django ORM weakness when it comes to fetch an huge amount of data from the database. But I don't understand how named cursor are su...
Luxuriance asked 28/9, 2013 at 17:28

9

Solved

I'm looking for the most efficient way to bulk-insert some millions of tuples into a database. I'm using Python, PostgreSQL and psycopg2. I have created a long list of tulpes that should be insert...
Scorekeeper asked 16/2, 2010 at 9:36

1

Am taking backup of postgres database using pg_dump command using linux command line. Want to retsore databse using psycopg2. Running following command cur.execute(open("db.sql", "r").read()) It...
Communard asked 18/1, 2019 at 12:4

1

Solved

I can't install psycopg2 on my m1 Mac. I tried to reinstall openssl with brew. I tried a lot of thing but nothing changed. The error log is super long so I couldn't understand what is wrong. I am f...
Tarra asked 16/3, 2021 at 17:41

© 2022 - 2024 — McMap. All rights reserved.