On Sun, Sep 1, 2013 at 7:51 PM, Roger Binns <rog...@rogerbinns.com> wrote:

>
> He needs to give the exception traceback which will show what is happening
> at the time.
>
> A common mistake with newish Python programmers is to catch all
> exceptions, and then keep going which also hides the exception tracebacks.
>

I have taken out the try/except catch and will hope this error occurs soon
and report back with the offending line.  I don't think it will tell me
much, though, other than the "SQlite logic error or missing database" and
the SELECT or INSERT INTO query that triggered that.  Keep in mind, these
exact same queries *do work* if I just wait a few seconds and try again, so
there is nothing wrong with them per se.



>
> On 01/09/13 15:12, Richard Hipp wrote:
> > Does Python have an interface to the error and warning log mechanism
> > of SQLite?  (http://www.sqlite.org/errlog.html)  Can you turn that on?
> > It will probably give more details about what it happening.
>
> pysqlite is the standard Python sqlite3 module and doesn't expose that
> functionality.  (It also hasn't had a new release in over two years.)  It
> tries to make SQLite look like the standard Python DBAPI and maps the
> SQLite errors into those fewer DBAPI exceptions.
>
> APSW (disclosure: I am the author) does provide the SQLite errors in a 1:1
> mapping to exceptions.  The error log could be used in theory, but is
> impractical because it has to be setup before any other SQLite call.
> There doesn't appear to be any reason why it can't be changed after the
> library is initialised.
>
> I'll see if I can add something more useful to the next APSW release.
>

If you think APSW would provide more details about just what went wrong
other than "SQLite logic error or missing database" (which, I feel, doesn't
tell me much at all), then I could potentially try it.

Is setting up APSW and making the transition from pysqlite2's wrapper
fairly straightforward, or would I have to re-do all the database queries?
(Even so, I do them all in one utilities library, so perhaps it would be
not too much work).

That's an impressive project, btw!  I'm surprised this is the first I've
heard of it.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to