windows/sqlite3 issue

Geert Janssens janssens-geert at
Thu Jan 13 03:57:08 EST 2011

On Thursday 13 January 2011, Elizabeth Dodd wrote:
> On Wed, 12 Jan 2011 09:23:09 -0500
> Derek Atkins <warlord at MIT.EDU> wrote:
> > OH!  I see the problem!   You stored your data file in your .gnucash
> > directory!  I'm sorry to say but your data is gone, overwritten by
> > gnucash's meta data.  See the FAQ:
> >
> > _anymore.3F__It_just_says:_parser_error_:_Start_tag_expected.2C_.27.3C.27
> > _not_found
> > 
> > I'm afraid you will need to start over again and this time try saving
> > your data to a non '.gnucash' directory.
> Obviously one never gets caught here more than once but...
> Thoughts on this
> 1. Why does gnucash reinstall / upgrade write over the my_data file? Is
> this necessary?
When you Install/Update GnuCash, nothing is overwritten anywhere. The problem 
occurs while running GnuCash.

And even then it won't overwrite your date file, unless you choose to put your 
data file in the one spot that gnucash reserves for it's internal 
housekeeping. This location is /home/<user>/.gnucash on linux and is a hidden 
directory there. So on linux and friends it very rarely happens a user would 
choose that directory to store a data file.
On windows I believe this directory is c:\Documents and 
Settings\<user>\Application Data\.gnucash
Again a location you wouldn't come up with yourself to store your data file. I 
am intrigued why people then still occasionally use that location. I do 
suspect (but haven't verified) that this path is suggested by default when a 
user uses GnuCash for the very first time to save a data file. If so, then 
that's something we should definitely fix.

> 2. Should upgrade script firmly remind someone to save / backup to
> removable media before proceeding?
It could, because having a backup of your data is always a good idea. It would 
not solve the current problem though as it is totally unrelated to Installing 
or Upgrading.

> 3. Should a *new* install suggest a default place to save data so those
> who just save to /home/me/somewhere find their data in /home/me/gnucash
> and those who wish to make a different choice are free to do so?
That indeed would make more sense. If the problem is indeed as I suggest, this 
would already reduce the risk quite a bit.

Another thing that would help is if GnuCash would use a unique extension for 
its metadata files. Currently for each datafile you have, there's an 
equivalent metadata file in .gnucash/books/ with exactly the same name in some 
circumstances. This is why your data file will get overwritten if you choose 
to save it in that directory, the metadata is only written when GnuCash closes 
(so *after* you have saved your book) and into .gnucash/books. If you chose to 
save your data file in there, the meta data overwrites it since the metadata 
file can use the exact same name. This would be fixed if we chose to add a 
different extension to the metadata file, like .gcm (for GnuCash Metadata).


More information about the gnucash-user mailing list