Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SQLite logic error or missing database

Reply
Thread Tools

SQLite logic error or missing database

 
 
CM
Guest
Posts: n/a
 
      07-30-2013
(Posted to SQLite users list first; 3 views so far, and no answers,
so trying here, thinking that perhaps a Python user would have some
clues; I hope that is OK)

I am using SQLite through either Python 2.5 or 2.7, which is the sqlite3
module. In a desktop application, every now and then, and in a fairly
irreproducible way, when committing to the database I get this error:

"sqlite3.OperationalError: SQL logic error or missing database"

I thought this was a PySqlite generated error, but now I see the same
error is seen with Ruby, PHP, C++ and other languages, so now I think
it is generated by SQLite itself...but I really don't know.

If I try additional commits in that same instance of my app being open,
it gives me the same error every time. If I close the app and re-open
it, it does not give me this error, with the same or very similar data
being written in the same routines. So I "know" that the code as
written is correct (a significant--greater than 90%?--of the time I
don't see this error).

In terms of what is causing this, I don't know. But I've noticed that
on the occasions that this has happened my computer's RAM was pretty
bogged down and my computer is pretty laggy. That said, I've had
other times when my RAM was hogged just as much and it didn't do this.

This error might go away if I used a newer/cleaner/more RAM computer,
but I want to "stress test" my application for those who may be using
similarly clunky computers--I want to try to avoid it even for older
model computers.

Any advice appreciated.
 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      07-30-2013
On Tue, Jul 30, 2013 at 3:02 AM, CM <(E-Mail Removed)> wrote:
> If I try additional commits in that same instance of my app being open,
> it gives me the same error every time. If I close the app and re-open
> it, it does not give me this error, with the same or very similar data
> being written in the same routines. So I "know" that the code as
> written is correct (a significant--greater than 90%?--of the time I
> don't see this error).


Is it a race between two concurrent instances of the app? I don't know
sqlite but that seems like something to consider, at least.

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Ruby sqlite/gem error: Could not load sqlite adapter jhs408@gmail.com Ruby 4 04-18-2009 12:53 AM
SQLite3::SQLException: SQL logic error or missing database Une Bévue Ruby 6 10-16-2007 11:59 PM
Installing sqlite-ruby when sqlite is in non-standard location Carl Youngblood Ruby 1 04-09-2005 03:32 AM



Advertisments