Have a quick question about my html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Have a quick question about my html

https://github.com/FasterJake/Flask-Login-register/tree/main/templates Here is what I am working with currently. My problem is when I go to do the check if a username exists or not I get an error but I am not sure what to do about it. "sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: user.Username [SQL: INSERT INTO user ("Username", password) VALUES (?, ?)] [parameters: ('jake013245', b'$2b$12$iGUE1Qo1Ld6u216YhB2JIOz2.szktpEKbo.Dxb6B4Sa6EGELFcQdW')] (Background on this error at: https://sqlalche.me/e/14/gkpj)" I think it is flagging at line 102. Any insight would be great. haha

4th Jul 2022, 12:14 AM
Jake Scanlan
Jake Scanlan - avatar
1 Answer
+ 1
Read the error message. "Unique constraint failed" "Insert into user" The error occurs, because your code is trying to add a new row to the user table, but it already has a row with the same username (probably), so insertion is failing.
4th Jul 2022, 6:41 PM
Tibor Santa
Tibor Santa - avatar