"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi all, > > I'm trying to read a sqlite database that was created as part of a trac > installation. I'm running > ubuntu, python 2.3.4 and pysqlite2 > > I can read the db fine on a window server. > > When i copy the db over to our linux box though, i'm having some problems. > > I've written a very simple test script to try and open the db. When i run it, > i get an error when i > try to execute a SELECT statement. > > pysqlite2.dbapi2.OperationalError: unsupported file format >
SQLite versions 3.3.0 through 3.3.6 generated by default a database file that includes new features (decending indices) and which cannot be read by version 3.2.8 and earlier. Probably this is what happened here. The database file was generated by a later version and how you are trying to access it with an older version. Solution: Get SQLite 3.3.8 which can read anything. For version 3.3.7 and following, the old legacy file format is generated by default. But later versions can still read the newer file format. And you can specify the newer file format (in order to use descending indices) using a pragma if you want. At some point in the future, once the whole world has upgraded to version 3.3.0 or later, I will make the new file format with decending indices the default again. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------