[cse491] Locking error

Alex Nolley nolleyal at msu.edu
Sat Oct 18 16:27:15 PDT 2008


That's what is stumping me because not only do I do a conn.commit() at the
end of my add_user function, but the add_user function isn't even being
called when this error is thrown.

 

-Alex

 

 

This happens when you don't do a c.commit() after your done doing stuff with
the database in add_user.


Eric



On Sat, Oct 18, 2008 at 6:59 PM, Alex Nolley <nolleyal at msu.edu> wrote:

Hey I keep getting the error 'database is locked' when I run the tests. This
occurs on line 540 of the webserve-test.py file. When I open a python
interactive terminal and run each command through it:

import webserve

conn = webserve.conn

c = conn.cursor()

c.execute("DELETE FROM users WHERE username='foo'")

 

I get the same error, so whatever the error is, it isn't related to a
previous test being run. I created the conn object directly under the import
statements like so:

conn = sqlite3.connect('webserve-info.db')

and I have a feeling this is related to the error but I don't know why. Does
anyone know how to solve this problem?

 

Thanks,

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/cse491-fall-2008/attachments/20081018/79868f8b/attachment.htm 


More information about the cse491-fall-2008 mailing list