sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread...

engine = create_engine('sqlite:///DB/Photolysis.db')
修改为这句话
engine = create_engine('sqlite:///DB/Photolysis.db?check_same_thread=False')

你可能感兴趣的:(sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread...)