title: Python sqlite3.OperationalError: no such table:
body: <p>I am trying to store data about pupils at a school. I've done a few tables before, such as one for passwords and Teachers which I will later bring together in one program.  </p>
  
  <p>I have pretty much copied the create table function from one of these and changed the values to for the Pupil's information. It works fine on the other programs but I keep getting:</p>
  
  <pre><code>sqlite3.OperationalError: no such table: PupilPremiumTable
  </code></pre>
  
  <p>when I try to add a pupil to the table, it occurs on the line:</p>
  
  <pre><code>cursor.execute("select MAX(RecordID) from PupilPremiumTable")
  </code></pre>
  
  <p>I look in the folder and there is a file called <code>PupilPremiumTable.db</code> and the table has already been created before, so I don't know why it isn't working.</p>
  
  <p>Here is some of my code, if you need more feel free to tell me so, as I said it worked before so I have no clue why it isn't working or even what isn't working:</p>
  
  <pre><code>with sqlite3.connect("PupilPremiumTable.db") as db:
      cursor = db.cursor()
      cursor.execute("select MAX(RecordID) from PupilPremiumTable")
      Value = cursor.fetchone()
      Value = str('.'.join(str(x) for x in Value))
      if Value == "None":
          Value = int(0)
      else:
          Value = int('.'.join(str(x) for x in Value))
      if Value == 'None,':
          Value = 0
      TeacherID = Value + 1
      print("This RecordID is: ",RecordID)
  </code></pre>