every time i try to make connection between python and PSQL this error disappear ?
I noticed that the 2018 lecture for SQL only specified to set the database URL to ours but didn't go through it. I was able to run the code after doing the following (I'm using Linux and Python3):
1. Install psycopg2 within pip
$ sudo pip3 install psycopg2
2. Set DATABASE_URL
$ export DATABASE_URL="postgresql:///(database name)" note that other sources say that it's "postgresql://localhost/(database name) but my code worked when I omitted the localhost
3. Run the python file.