title: How to fix '(sqlite3.ProgrammingError) SQLite objects created in a thread can only be used in that same thread.' Issue?
body: <p>I'm utilizing Flask and SqlAlchemy. The database I've created for SqlAlchemy seems to mess up when I try to run my website and will pop up with the error stating that there's a thread error. I'm wondering if it's because I haven't dropped my table from my previous schema. I'm using a linux server to try and run the "python3" and the file to set up my database. </p>
  
  <p>I've tried to physically delete the table from my local drive and the re run it but I still up this error. </p>
  
  <pre><code>from sqlalchemy import create_engine
  from sqlalchemy.orm import sessionmaker
  from sqlalchemy.orm import scoped_session
  from database_setup import Base, Category, Item
  
  engine = create_engine('sqlite:///database_tables.db')
  Base.metadata.bind = engine
  
  Session = sessionmaker()
  Session.bind = engine
  session = Session()
  
  brushes = Category(id = 1, category_name = 'Brushes')
  session.add(brushes)
  session.commit()
  
  
  pencils = Category(id = 2, category_name = 'Pencils')
  session.add(pencils)
  session.commit()
  </code></pre>
  
  <p>When I am in debug mode using Flask, I click the links I've made using these rows, but after three clicks I get the error </p>
  
  <pre><code>"(sqlite3.ProgrammingError) SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 140244909291264 and this is thread id 140244900898560 [SQL: SELECT category.id AS category_id, category.category_name AS category_category_name FROM category] [parameters: [{}]] (Background on this error at: http://sqlalche.me/e/f405)"
  </code></pre>