mikeizbicki / cmc-csci040

Computing for the Web
37 stars 58 forks source link

sqlite3.OperationalError: database is locked #231

Closed sophiahuangg closed 2 years ago

sophiahuangg commented 2 years ago

Hi Mike,

I tried return redirect for create users, and it was working fine until I wrote an if statement that only redirected to the home page if I was logged in. I'm not getting these two errors: sqlite3.OperationalError: database is locked and sqlite3.IntegrityError: UNIQUE constraint failed: users.username. Also, I tried changing it to my original code that was return response which successfully displayed a message before if the username was already in the data base. It doesn't do that anymore and also throws me these errors. I tried changing insert into users to insert or replace into users, but I realized this doesn't give the user a message anymore if there already exists someone with the username.

I was wondering what these errors mean and if you have any tips?