Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Piece of my code:
- @app.route('/register', methods=['GET', 'POST'])
- def register():
- form = RegisterForm(request.form)
- if request.method=='POST' and form.validate():
- name = form.name.data
- email = form.email.data
- username = form.username.data
- password = sha256_crypt.encrypt(str(form.password.data))
- c.execute("INSERT INTO users(name,email,username,password)
- VALUES(?,?,?,?)", (name, email, username, password))
- conn.commit
- conn.close()
- The error:
- File "C:Usersapp.py", line 59, in register c.execute("INSERT INTO users(name,email,username,password) VALUES(?,?,?,?)", (name, email, username, password))
- ProgrammingError: SQLite objects created in a thread can only be used in that
- same thread.The object was created in thread id 23508 and this is thread id
- 22640
Add Comment
Please, Sign In to add comment