I have a large script that saves data to a postgres database. Tell me how can I get rid of [‘ and ‘]. I need the data in the storage to be saved without these characters This is how the data looks in the database Tell me how to get rid of these characters, perhaps the problem occurs after parsing
Tag: postgresql
FASTAPI Delete Operation giving Internal server error
I have this code for delete operation on a Postgresql DB: The create and read operations work fine. If I pass an existing or a non-exsiting id to delete, I get a 500 Internal Server error. The row does get deleted from the table though. If I comment this line deleted_post = cursor.fetchone(), it works okay. Here is the error
Inserting tuple into postegresql with python – Select statment
Hello I am trying to insert to a pgadmin table using python, I used execute and it worked, but for my second aprt i need to use a fucntion, I got everything working except the inserts with select, it tells my syntax error, or forgot comma, literally everything. Im new, so help would be apprecitated . Error Answer You need
psycopg update with unnest for a bytea column
I’m trying to update a lot of row in my database using unnest(). Here’s my db: Then I update the table with: But I got the following error: However, it’s working if I do a classic update. Any idea ? Answer Since your data is a 2×100 matrix, is better to partition it in vectors (1d array) for each parameter
“Database ‘docker-db’ does not exist”
so I have this problem building django/postgre app with docker. it keeps saying “database does not exist” and quite few time googling doesnt bring any results. I already scrapped the volumes and rebuilt my app few times, followed different guides on how people do the postgres, still no luck making it work for me. Dockerfile compose.yml .env UPDATE: Error messages
In my List of multiple dictionaries only my last dictionary item save on database, I want to save all [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 6 months ago. Improve this question
How to setup psycopg2 in a docker container running on a droplet?
I’m trying to wrap a scraping project in a Docker container to run it on a droplet. The spider scraps a website and then writes the data to a postgres database. The postgres database is already running and managed by Digitalocean. When I run the command locally to test, everything is fine: I can visualize the spider writing on the
How to upload data from csv to database(PostgreSQL) on python
I have a few parsers that collect data and make csv file, after collecting data I need to upload data from csv to my database(PostgreSQL) p.s.table in database is already exist and just need to append data How can I do this? I have try to use sqlalchemy, but after connection don’t know what to do Didn’t find information that
How to parameterize create table function for PostgreSQL in python
I need to dynamically create tables in python this statement works when the variable is statically identified but when I use a variable I get the following error When I change to using this code it will work Here is the error The only thing not in this is a method to manage connection parameters that is working new error
Django test uses wrong database in some cases
I try to setup my Django tests, and I noticed that when I run all tests TestRunner uses correct test database (for all aliases): docker-compose exec my_project python manage.py test –keepdb But when I run tests for specific module, it uses the original database: docker-compose exec my_project python manage.py test –keepdb apps.my_module What is the reason of such behavior? Using