Python Forum
Psycopg2 import files from another map
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Psycopg2 import files from another map
#1
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!
Reply


Messages In This Thread
Psycopg2 import files from another map - by BluezamX - Jan-18-2017, 11:23 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020