Something seems to be broken in the setup of my online accounts: whenever I get transactions for one of my accounts (via HBCI), Gnucash creates transactions for a different account and also looks for transactions to match in that other account.

I would assume the problem is that I've matched the accounts wrong, but first I've quadruple-checked that the online account is associated with the correct Gnucash account and second, if it weren't, then Gnucash wouldn't even offer the option to "Get transactions" for that account in "Online Transactions."

At some point, I did have the online account associated with the wrong Gnucash account and I suspect that Gnucash simply doesn't update that setting correctly. But it doesn't show this faulty association anywhere I can see.

My question is: how does Gnucash decide for which account to create transactions when importing, and how do I change that?

  • This is more of a software question, try looking here for a potential answer. Commented Nov 16, 2015 at 17:29
  • @Derek_6424246 - No, this isn't a software question, and that one you linked to does not solve this problem. I have this same issue because my bank mislabeled my accounts and now I can't figure out how to get them fixed, even though in the online setup it shows it pointing to the proper one. My first instinct was to dig into the GNUCash file itself after gunzipping it, but it's nearly unreadable XML, so I started looking at the aqbanking config files as that's what is used on the backend, but that seems a dead end. I suppose I can always delete and re-import . . . Commented Mar 22, 2016 at 6:11

2 Answers 2


Okay, so one possible solution is to copy the .gnc file to a file ending in .gz, uncompress it using gunzip, cut the online_id from the account that is the wrong one and paste it into the correct account. The block itself with enclosing tags should look like this:

<slot> <slot:key>online_id</slot:key> <slot:value type="string">34098409741-23309845</slot:value> </slot>

Unfortunately, I can't verify this as all my testing has set off some security measures that have now locked me out of online access to my accounts. I'll try posting a follow up when I test it in full.

BTW, it goes without saying: make a backup of your original .gnc and always use cp -iv

  • 1
    I also had to move the rather lengthy section describing the naïve Bayesian matcher. Thanks especially for the tip about the file being a gzip'ed XML fil. I didn't think that far. Commented Mar 22, 2016 at 13:32

I was having the same error, and what did it for me was closing the tab associated with the correct target account and reopening it from the accounts list, as weird as that sounds. Then I tried to download the transactions again and it worked. Somehow, the mapping got stale leaving that window open for so long (years) across many version upgrades and account modifications.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .