Kmymoney parsing error on Ubuntu 24.04

Version 5.1.3 Kmymoney on 24.04 1 LTS
When trying to open .qfx file, get the Unable to import using OFX plugin. The plugin returned the following error: Unable to parse file

This is a fresh install of Ubuntu. And of course, this all worked flawlessly on the old system so I don’t feel the bank has changed its file format.
Does anyone have an idea of the cause?
Thank you.

1 Like

It seems, that QFX files exist in two different formats: one is based on XML which is what the plugin understands, and the other one is a binary (maybe proprietary) format. We just recently got the screenshot of such a binary file opened in an editor attached to one of our bug entries. That is the version the plugin does not know of and will respond with the said error message.

Since you’re on Kubuntu, can you open a terminal/konsole window and run the file utility on your qfx file? What does it report?

Here’s how this looks like when I do this on some qfx test files I have:

thb@nb /home/thb $ file Downloads/testml.qfx 
Downloads/testml.qfx: ASCII text, with CRLF line terminators
thb@nb /home/thb $ file Downloads/vanguard-anonymous.qfx 
Downloads/vanguard-anonymous.qfx: ASCII text

file transactions_xxxx.qfx results in ASCII text

That’s cool, because in this case it should be possible to be processed. Can you monitor which messages are printed to the console when importing the file and post them here?

Unable to import /home/sjwilke/Downloads/transactions_1234.qfx using OFX plugin. The plugin returned the following error: Unable to parse file.

I thought that got printed to an error dialog popping up. My instructions probably were not detailed enough.

  • Start KMyMoney from a terminal (the same way you previously started the file utility)
  • Start importing the QFX file.

I am interested in the messages printed to the terminal window after you started the process until the error dialog pops up. I hope that makes it a bit clearer and hopefully we see some more details there.

OfxImporterPlugin::slotImportFile
setup callback routines
process data
LibOFX INFO: libofx_proc_file(): File format not specified, autodetecting…
LibOFX INFO: libofx_proc_file(): Detected file format: OFX (Open Financial eXchange (OFX or QFX))
LibOFX INFO: sanitize_proprietary_tags() removed: <INTU.BID>6157</INTU.BID>
LibOFX ERROR: find_dtd():Unable to find the DTD named opensp.dcl
LibOFX ERROR: find_dtd():Unable to find the DTD named ofx160.dtd
LibOFX ERROR: ofx_proc_file(): FATAL: Missing DTD, aborting
process data done
kf.notifications: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification

That is the root cause. It’s not finding a few required files. What is the output (again in a terminal window) of the following two commands:

find /usr -name opensp.dcl
find /usr -name ofx160.dtd

I have those installed as part of libofx which I build myself so the paths might be different for you. Maybe we deal with a packaging issue on Kubuntu which would explain why it worked previously.

Coming up with nothing on those commands. Even searched other directories. I am not finding those two files.

Ok, then it looks like a packaging issue of the libofx package for Ubuntu. You probably need to contact someone over there.

Thank you for your assistance.

I’m getting the exact same error trying to import ofx files. Did you find a fix?

@SJ_Wilke did you ever bring this up on an Ubuntu list or forum?

I did summit a bug ticket at bugs.kde.org. I’ll try the discourse.ubuntu next.

It’s more helpful to post a link to the actual bug and not just the site: 499558 – Can not import ofx or qfx files using Ubuntu 24.04.1 LTS.

Here is a link to the bug report: 499558 – Can not import ofx or qfx files using Ubuntu 24.04.1 LTS

I ran sudo apt-get install libofx7t64 and got “libofx7t64 is already the newest version (1:0.10.9-1.1build2).”
I verified opensp.dcl and ofx160.dtd are located in /usr/share/libofx/libofx/dtd and are read only.
I installed KMyMoney as a snap package. Would an appimage be any different?

RESOLVED:
Uninstalling the snap package version from the App Center and installing the Debian version from the App Center fixed the importing problem with libofx. Also, KMM overall seems to be working smoother. We can close this tag/ticket.

On Ubuntu the two files mentioned by ipwizard are provided by the libofx7t64 package

I’m getting confused between this topic and the bug, but if KMM is installed as a snap package, not as the Ubuntu native package, that may well account for KMM not finding those files. If that is the case, I would call it a packaging issue for snap.