You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use psycopg2 connector and found that the connection with the database was working.
But I have run into another problem. Although the program is executing without throwing any errors the queries are not executing.
def setup_db():
db = psycopg2.connect(host='localhost', user='postgres', password='1234', dbname='test')
cur = db.cursor()
cur.execute("create extension if not exists cube;")
cur.execute("drop table if exists vectors")
cur.execute("create table vectors (id serial, file varchar, vec_low cube, vec_high cube);")
cur.execute("create index vectors_vec_idx on vectors (vec_low, vec_high);")
I have modified the function as shown above. But when I run face-add.py I am returned with the following error
Found 1 faces in the image file him.jpg
- Face #0 found at Left: 919 Top: 348 Right: 1240 Bottom: 669
Traceback (most recent call last):
File "face-add.py", line 47, in <module>
cur.execute(query)
psycopg2.ProgrammingError: relation "vectors" does not exist
LINE 1: INSERT INTO vectors (file, vec_low, vec_high) VALUES ('him.jpg)
The text was updated successfully, but these errors were encountered:
Hi again,
I tried to use psycopg2 connector and found that the connection with the database was working.
But I have run into another problem. Although the program is executing without throwing any errors the queries are not executing.
I have modified the function as shown above. But when I run face-add.py I am returned with the following error
The text was updated successfully, but these errors were encountered: