Hi John, Thanks for your prompt reply and support. Modifying the taxtable entry manually in the xml file solved the issue for me. I have been using Gnucash now for over 10 years. I guess that my taxtable entry is a result of Gnucash version 2.4 Back then, I was experimenting with the tax feature. Thanks, Derek
On 04.11.2017 17:43, John Ralls wrote: On Nov 4, 2017, at 6:52 AM, bugzilla <[1][email protected]> wrote: Hi everyone, when I try to export my xml file to sqlite3 it fails with the following error message in gnucash.trace * 21:57:19 INFO <qof.object> [qof_object_foreach] type=gncTaxTable * 21:57:19 INFO <qof.engine> [qof_collection_foreach] Hash Table size of gncTaxTable before is 1 * 21:57:19 CRIT <gnc.backend.dbi> [sqlite3_error_fn()] DBI error: 19: NOT NULL constraint failed: taxtable_entries.account * 21:57:19 CRIT <gnc.backend.dbi> [conn_execute_nonselect_statement()] Error executing SQL INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('08f93e8d3586eaa430e8f3213c1d0e0b',NULL,12000000,100000,1) * 21:57:19 CRIT <gnc.backend.sql> [gnc_sql_do_db_operation()] SQL error: INSERT INTO taxtable_entries(taxtable,account,amount_num,amount_denom,type) VALUES('08f93e8d3586eaa430e8f3213c1d0e0b',NULL,12000000,100000,1) * 21:57:19 INFO <qof.engine> [qof_collection_foreach] Hash Table size of gncTaxTable after is 1 * 21:57:19 INFO <qof.object> [qof_object_foreach] type=gncVendor If I search my xml file for the string 08f93e8d3586eaa430e8f3213c1d0e0b I will get entries which look like this: <gnc:GncEntry version="2.0.0"> <entry:guid type="guid">07ec55f2b0c25d1fb9c6abc17e60e9bd</entry:guid> <entry:date> <ts:date>2014-08-08 12:00:00 +0200</ts:date> </entry:date> <entry:entered> <ts:date>2009-11-19 09:59:37 +0100</ts:date> </entry:entered> <entry:description>Invoice description</entry:description> <entry:qty>1000000/1000000</entry:qty> <entry:i-acct type="guid">8ca307f6b598a944c90b5a51e2ca59c4</entry:i-acct> <entry:i-price>10600000/1000000</entry:i-price> <entry:invoice type="guid">ee97b01eaa71273e88224d4082b75f5b</entry:invoice> <entry:i-disc-type>VALUE</entry:i-disc-type> <entry:i-disc-how>SAMETIME</entry:i-disc-how> <entry:i-taxable>0</entry:i-taxable> <entry:i-taxincluded>0</entry:i-taxincluded> <entry:i-taxtable type="guid">08f93e8d3586eaa430e8f3213c1d0e0b</entry:i-taxtable> </gnc:GncEntry> <gnc:GncTaxTable version="2.0.0"> <taxtable:guid type="guid">08f93e8d3586eaa430e8f3213c1d0e0b</taxtable:guid> <taxtable:name>Steuertabelle 01</taxtable:name> <taxtable:refcount>0</taxtable:refcount> <taxtable:invisible>1</taxtable:invisible> <taxtable:parent type="guid">8e569076878f8126daafb6900ec07356</taxtable:parent> <taxtable:entries> <gnc:GncTaxTableEntry> <tte:amount>12000000/100000</tte:amount> <tte:type>VALUE</tte:type> </gnc:GncTaxTableEntry> </taxtable:entries> </gnc:GncTaxTable> <gnc:GncTaxTable version="2.0.0"> <taxtable:guid type="guid">8e569076878f8126daafb6900ec07356</taxtable:guid> <taxtable:name>Steuertabelle 01</taxtable:name> <taxtable:refcount>0</taxtable:refcount> <taxtable:invisible>0</taxtable:invisible> <taxtable:child type="guid">08f93e8d3586eaa430e8f3213c1d0e0b</taxtable:child> <taxtable:entries> <gnc:GncTaxTableEntry> <tte:amount>12000000/100000</tte:amount> <tte:type>VALUE</tte:type> </gnc:GncTaxTableEntry> </taxtable:entries> </gnc:GncTaxTable> However if I set up a new file with some test entries exporting to sqlite3 is not a problem. Would appreciate any hint which narrows the root course of this problem. You’re on the wrong list, please use [2][email protected] for support questions. I’ve copied my reply there for your convenience and left gnucash-devel so that others on that list will see my reply. When you reply, please use reply-all and then remove gnucash-devel from the CC list. The problem is that you have an entry in tax table "Steuertabelle 01" with no account assigned. The GUI won’t let you save an entry without one so it would seem that at some point either your XML file has become corrupted or you created the entry in an older version without that enforcement. Regards, John Ralls References 1. mailto:[email protected] 2. mailto:[email protected] _______________________________________________ gnucash-user mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
