0

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:

1

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • In the screenshot you posted, the line `records = cut.fetchall()` has incorrect indentation. – khelwood Jun 26 '20 at 22:38
  • Thank you! and how do I correct it? That is a screenshot from what I am supposed to write in my terminal. – pepapalacios Jun 27 '20 at 00:13
  • See [the indicated question](https://stackoverflow.com/questions/45621722/im-getting-an-indentationerror-how-do-i-fix-it) – khelwood Jun 27 '20 at 00:35

0 Answers0