[GNC] Regressing file formats

John Ralls jralls at ceridwen.us
Mon Dec 10 01:06:53 EST 2018



> On Dec 9, 2018, at 8:41 AM, David Bicking via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> I am using Gnucash on two computers.
> 
> One is a Debian derivative and is running Gnucash 2.6.4
> 
> The other is Windows 10, running GnuCashPortable with version 3.1
> 
> I was using the file (created on Debian) just fine on both computers, but one day I decided to try changing the format to the sqlite3 format so I could run reports against the data. Okay, did that, and figured out the schema and how to get meaningful reports. Great.
> 
> But I then discovered that the Debian copy of Gnucash could no loner open the file.
> 
> So back to windows, and saved the file back to the xml format.
> 
> But Debian still can't open the file coming up with an message that it doesn't support the sqlite3 datetime format.
> 
> I tried looking at the documentation, but couldn't find anything that would seem to regress the file so the older version of Gnucash can open it.
> 
> Is there a way for me to fix the file?

David,

Looks like there’s a hole in our Feature system: The SQLite3 date format is specific to the SQlite3 backend but there’s nothing in the feature system to tell GnuCash that so once the feature is set it applies to all backends.

The best solution would be to upgrade your Debian Gnucash instance to 2.6.21. 2.6.4 is quite old and we’ve fixed a ton of bugs since then.

If you like you can instead remove the feature setting from your data file. Uncompress it with gunzip if it’s compressed. I suggest you make a copy to work on so that you can easily try again if something goes wrong on the first try. Open the file in a plain text editor (nano and vi are both suitable and commonly installed by default on Debian; if you’re familiar with another like vim or emacs they’re fine too) and remove the following elements:

      <slot>
        <slot:key>ISO-8601 formatted date strings in SQLite3 databases.</slot:key>
        <slot:value type="string">Use ISO formatted date-time strings in SQLite3 databases (requires at least GnuCash 2.6.20)</slot:value>
      </slot>

Be careful to ensure that you get exactly those lines, paying particular attention to the opening <slot> and closing </slot>.

Regards,
John Ralls


More information about the gnucash-user mailing list