I'm currently working with the book "SQL for Data Analytics" and I'm encountering an issue in when trying to run a line.
with psycopg2.connect(host="localhost", user="myuser[enter image description here][1]", password="mypassword", dbname="sqlda", port=5432) as conn:
with conn.cursor () as cur: cur.execute("SELECT * FROM customers LIMIT 5")
I get an error in with conn.cursor
. I'm attaching a picture if it helps to see what I'm supposed to do: