title: sqlite3.IntegrityError: UNIQUE constraint failed: error even though the values I'm entering are unique?
body: <p>I have a database structured like this.</p>
  
  <pre><code>CREATE TABLE "work_order" ( "id" INTEGER, "ServiceTitle" TEXT UNIQUE, 
  "Link" TEXT UNIQUE, "Status" TEXT, PRIMARY KEY("id") );
  </code></pre>
  
  <p>When I try enter some values I get an error.</p>
  
  <pre><code>"sqlite3.IntegrityError: UNIQUE constraint failed: work_order.Link"
  </code></pre>
  
  <p>Then the program terminates. </p>
  
  <pre><code>Process finished with exit code 1
  </code></pre>
  
  <p>Even though the value I entered into the Link column is unique. </p>
  
  <pre><code> conn = sqlite3.connect('WO.db', timeout=10)
   c = conn.cursor()
  
   c.execute("insert into work_order (ServiceTitle, Link, Status) values 
   (?,?,?)", ('oo', 'll', 'rr'))
  
   conn.commit()
   conn.close()
  </code></pre>
  
  <p>The new record still gets inserted to the database exactly as I wanted. I just get this error on pycharm. </p>
  
  <p>I tried inserting the primary key ID also. It's not auto increment so I can enter it manually so long as it is unique. </p>
  
  <pre><code>conn = sqlite3.connect('WO.db', timeout=10)
  c = conn.cursor()
  
   c.execute("insert into work_order (id, ServiceTitle, Link, Status) values 
  (?,?,?,?)", (7, 'kkkk', 'eeeee', 'qqqqq'))
  
  conn.commit()
  conn.close()
  </code></pre>
  
  <p>Again I get an error in pycharm but different this time. The record still gets inserted into the database again though exactly as I wanted. The process then terminates again. </p>
  
  <pre><code>sqlite3.IntegrityError: UNIQUE constraint failed: work_order.id
  
  Process finished with exit code 1.
  </code></pre>
  
  <p>Any suggestions as to why I'm getting this error even though all of the values i'm entering into these columns are unique values not present in the database?</p>
  
  <p>UPDATE***  I created a new table and removed the unique constraints. I now get no error but the records enter the table twice. Which is what the problem was when there was Unique constraints. I don't know why there is two records being inserted though. </p>