Jan-18-2017, 11:23 AM
For a school project I'm working with Psycopg2 and PostgreSQL. However, when I try to run
connection = psycopg2.connect("dbname=NAME user=USER password=PASSWORD"
I get the error
File "C:\Program Files\Python35\lib\site-packages\psycopg2\__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: database "NAME" does not exist
I believe this is because the database is located in another map, but I can't find how to access this map anywhere. I've tried using cd .. but this also won't work for me.
Does anyone know how I can access files in another map with Psycopg2, or tell me where I'm going wrong?
Thanks!
connection = psycopg2.connect("dbname=NAME user=USER password=PASSWORD"
I get the error
File "C:\Program Files\Python35\lib\site-packages\psycopg2\__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: database "NAME" does not exist
I believe this is because the database is located in another map, but I can't find how to access this map anywhere. I've tried using cd .. but this also won't work for me.
Does anyone know how I can access files in another map with Psycopg2, or tell me where I'm going wrong?
Thanks!