[GNC] Export from Android can't open XML on Windows

dragospuri dragospuri at gmail.com
Mon May 20 14:04:01 EDT 2019


John Ralls-2 wrote
>> On May 20, 2019, at 9:20 AM, dragospuri <

> dragospuri@

> > wrote:
>> 
>> John Ralls-2 wrote
>>>> On May 19, 2019, at 12:51 PM, dragospuri <
>> 
>>> dragospuri@
>> 
>>> > wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> As the title says, the Android version of GnuCash works fine. I can
>>>> export
>>>> xml, not csv (says there are no transactions to export...). Don't know
>>>> if
>>>> that matters.
>>>> 
>>>> After many hours googling I got to the trace file which has these 2
>>>> probably
>>>> important lines out of 30000:
>>>> 
>>>> * 22:34:02 ERROR 
>>> 
> <gnc.backend.xml>
>>> gnc_commodity*
>>>> dom_tree_to_commodity_ref(xmlNodePtr, QofBook*): assertion 'ret !=
>>>> NULL'
>>>> failed
>>>> 
>>>> * 22:34:07  WARN 
>>> 
> <gnc.backend>
>>> [GncXmlBackend::load()] Syntax error in Xml
>>>> File 
>>> 
> <FILE ADDRESS>
>>>> 
>>>> How can I trace the NULL ref from here? Maybe correct the xml manually?
>>>> What can I do?
>>>> 
>>>> Android version: 2.4.0
>>>> Windows version: 3.5+(2019-03-30)
>>> 
>>> 
>>> The first one is saying that some commodity entry in the book isn't
>>> found
>>> in the commodities already loaded. That's probably not the problem,
>>> especially since the syntax error warning is 5 seconds later.
>>> 
>>> What are the 10 or so lines in the trace file immediately before the
>>> "Syntax error" message?
>>> 
>>> Regards,
>>> John Ralls
>>> _______________________________________________
>>> gnucash-user mailing list
>> 
>>> gnucash-user@
>> 
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> If you are using Nabble or Gmane, please see
>>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>> 
>> 
>> Hi John,
>> 
>> Thank you for answering. I've been having this issue for a couple of
>> years
>> and have only been updating my accounts on mobile, which is a lot
>> slower...
>> 
>> These are the lines around the WARNING. They go like that for thousands
>> of
>> lines above and hundreds below.
>> 
>> 
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bd34de0
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bd34f00
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bd34de0
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bd34de0
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bac9040
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bac90d0
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bac91f0
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccOpenLog] Attempt to open disabled
>> transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.translog>
>  [xaccTransWriteLog] Attempt to write
>> disabled transaction log
>> * 22:34:07  INFO 
> <gnc.engine>
>  [trans_cleanup_commit] get rid of rollback
>> trans=0bac9280
>> ** 22:34:07  WARN 
> <gnc.backend>
>  [GncXmlBackend::load()] Syntax error in Xml
>> File D:\Google
>> Drive\GnuCash\20190519_220110_gnucash_export_MyFinance_12.gnucash.gnca*
>> * 22:34:07  INFO 
> <gnc.account>
>  [xaccAccountRecomputeBalance] acct=Template
>> Root starting baln=0/1
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bd3ade0 template into nsp=0bc7eaf0 template
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1b308 ADF into nsp=0bc73a10 CURRENCY
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1b718 ADP into nsp=0bc73a10 CURRENCY
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1aea8 AED into nsp=0bc73a10 CURRENCY
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1b058 AFA into nsp=0bc73a10 CURRENCY
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1b2d8 AFN into nsp=0bc73a10 CURRENCY
>> * 22:34:07  INFO 
> <gnc.commodity>
>  [gnc_commodity_table_insert] insert
>> 0bf1b0d8 ALL into nsp=0bc73a10 CURRENCY
>> 
>> 
>> 
>> The only other out of the ordinary things I could find are at the very
>> end
>> of the log file:
>> 
>> * 22:49:21  WARN 
> <gnc.core-utils>
>  Could not locate file AUTHORS
>> * 22:49:21  WARN 
> <gnc.core-utils>
>  Could not locate file DOCUMENTERS
>> * 22:49:21  WARN 
> <gnc.core-utils>
>  Could not locate file LICENSE
>> 
>> Any other way I could find more information about the syntax error?
>> The XML Tools plugin for Notepad++ doesn't give any parsing errors, so I
>> don't think it's an xml issue... But who knows.
> 
> The file is failing to load, right? I trust you found the "out of the
> ordinary" messages by searching the trace file for "WARN" or "ERR". It's a
> bit surprising that the file is failing to load without any other warnings
> or errors.
> 
> It's probably not that the XML document isn't well-formed, which is all
> that Notepad++ is likely to check but rather that there's either a missing
> element or one that GnuCash's xml backend thinks shouldn't be there.
> 
> Absent any useful diagnostics the way to find the problem is to first make
> a copy of the file, then open it in your editor. All of the transactions
> will be in a block, so find the first instance of 
> <gnc:transaction>
>  and the last instance of 
> </gnc:transaction>
>  and delete them with everything between. Save the file and try to open
> it. If that works then it's a bad transaction. Delete that copy and make a
> new one, this time removing only half of the transactions. If that one
> loads then the problem is in the deleted ones, if not in the remaining
> ones. In the latter case delete half the remaining transactions; in the
> former restore the deleted transactions and delete half of them again.
> Repeat that process until you've found a single transaction that breaks
> the load.
> 
> BTW, the huge volume of messages in your trace file is because you're
> running GnuCash with the --debug flag. You must have set that on the
> shortcut at some point, it's not the default. If you remove it you'll have
> only warnings.
> 
> Regards,
> John Ralls
> 
> _______________________________________________
> gnucash-user mailing list

> gnucash-user@

> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


Ok. I believe I have found it. It wasn't a transaction, but a <price>.
Removing the following lets me open the file in gnucash:

      <price>
        <price:id type="guid">4625ffc94c6f4ed68528191dab4f5602</price:id>
        <price:commodity>
          <cmdty:space>ISO4217</cmdty:space>
          <cmdty:id>RON</cmdty:id>
        </price:commodity>
        <price:currency>
          <cmdty:space>ISO4217</cmdty:space>
          <cmdty:id>XBT</cmdty:id>
        </price:currency>
        <price:time>
          <ts:date>2018-07-29 00:32:29 +0300</ts:date>
        </price:time>
        <price:source>user:xfer-dialog</price:source>
        <price:value>39/1254250</price:value>
      </price>

Probably XBT isn't accepted?!

I'm not sure yet how this will affect my transactions that involve this
(worried), or how to find them.
Thanks a lot for the help.

Best Regards,
Dragos



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list