-2

I am new to python and getting a syntax error with my first program. Can you please help correct the syntax?

GET_CONTACT = "SELECT LINKEDIN_URL, CONTACT_ID from PERSON where LINKEDIN_URL=%s"

def isContactExists(linkedinUrl):
    cur.execute(GET_CONTACT, (linkedinUrl, ))
    return cur.fetchone()

if existing_contact is not None:
        storeInTempTable(record)
    return

Throws syntax error -

storeInTempTable(record)
                       ^
TabError: inconsistent use of tabs and spaces in indentation
Vasilis G.
  • 7,556
  • 4
  • 19
  • 29

1 Answers1

0

You are having spaces and TAB both into your code. Don't mix space and TAB.

GET_CONTACT = "SELECT LINKEDIN_URL, CONTACT_ID from PERSON where LINKEDIN_URL=%s"

def isContactExists(linkedinUrl):
    cur.execute(GET_CONTACT, (linkedinUrl, ))
    return cur.fetchone()

if existing_contact is not None:
    storeInTempTable(record)
    return
Binit Amin
  • 481
  • 2
  • 18