Kmymoney parsing error on Kubuntu 24.04

Hi,

I’ve just installed KMyMoney 5.1.3 onto a new desktop pc running Kubuntu 24.04.
I copied the current.kmy and kmymoneyrc from the old machine and everything seemed fine until I tried to download a new file from my financial institution in the form of a .ofx file.

This gives me a very similar problem to that reported by SJ_Wilke just a couple of days ago. I ran through the diagnostics you suggested back then and found that opensp.dcl and ofx160.dtd weren’t installed so I used Muon Package Manager to install the libofx package but still don’t manage to update my data.

As a work-around, I tried downloading a .csv file to see if this would work any better and having run through the Banking CSV set-up, I reach step 5 for formats and tell it that date format is d m y. It quite happily accepts 28 Oct 2024 and 01 Nov 2024 as a valid entry but rejects 18 Sep 2024. And there endeth my opportunity to update my account data.

I note that you had identified a problem with the snap install (ref HSPri, Nov 23) - should I possibly try a fresh install or could you suggest anything else?

Many Thanks,

ACLang

This seems to have slipped through the cracks. The topic you mentioned (How to Set Up KBanking) does seem to be the only other relevant mention of snaps. I’ve added the snap tag here, in case someone else with more knowledge can take a look.
I don’t know how to tell if a new snap package has been generated, so reinstalling is probably worth testing. If that doesn’t help, you might try the appimage version, as also mentioned in that other thread.

I note that you had identified a problem with the snap install (ref HSPri, Nov 23) - should I possibly try a fresh install or could you suggest anything else?

I’m running KMM 5.1.3 on Kubuntu 24.04 also. I have found using snap to be problematic at times. Can you install KMM and the other packages from APT ?

@ostroffjh @jehoshua
Hi,
Thank you for your interest in this issue.
The problem I am experiencing is from a new installation of KMM on a new pc and I have installed the libofx package but this did not improve the situation.
I recovered the hard drive from the old pc and I was able to run KMM from that installation but , while it worked well for reviewing existing information, I found that I had the same problem with import of new files. This seems to indicate that the problem lies in the Ubuntu operating system.
I’m not quite sure where to go next.
Thank you,
Alan

Please check that you have the opensp package installed. I kind of remember that this was a problem for some lately.

It should actually be a dependency of libofx but in some cases might not be.

Hi Thomas,

First of all, a huge thank you for your continuing support on this project.

I used package manager to install a part of opensp which was missing but I still have the same problem.

Running my old installation of KMM (from the old HDD as an external usb drive) through the Kubuntu OS on my new machine has the same issue which seems to indicate that the problem is with the operating system, or its dependencies. My last p.c. was running Kubuntu 22.04 so I guess there is some subtle difference between the two versions that I can’t fathom.

I guess I could run a side by side comparison of the old and new Kubuntu installations but I wouldn’t have a clue what to look for.

Thanks,

Alan

ACLang, sorry if I missed it, but can you be more specific about exactly what goes wrong, and when kn the process? Do you get any error message? If you start KMM from command line, is there any useful error output to console? One further option to find what file (if any) is missing, is to run “strace kmymoney” (which will produce very voluminous output) and see if you can see any relevant error when you have the problem importing.
Also, since this seems to be a problem unique to Ubuntu, have you looked at/posted to any Ubuntu forum or list?

You can limit the output to file activities (there are still a lot) with

strace -e trace=file kmymoney

Hi Ostroffjh and Thomas,

I ran “alan@alan-AE8:~$ strace -o output.txt -e trace=file kmymoney”. KMyMoney opens OK and I went through the steps of trying to import an *.ofx file which I’d already downloaded. This returned the error ‘unable to parse file’.

Curiously, the screen dump in terminal gave different output compared to the text in output.txt.

On the screen I saw a few lines which might be of interest:

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

I copied the usr/share/libofx (which contains opensp.dcl and ofx160.dtd) from my old hdd to the new installation and reran the strace command with exactly the same result.

As I write this, it occurred to me that when I set up KMyMoney on the new machine, I copied across the file Current.kmy from the old machine. This means that when I started KMM on the new p.c., everything seemed to be up to date but I was unable to add any new content. I wonder if something in the current.kmy file is causing the problem?

Thanks,

Alan

At this point, I do not suspect any problem in your .kmy file, but just missing dependencies.

strace output file is understandably different from KMM output. KMM prints progress and error messages. strace prints information about all system calls used by the program. The trick is to find the failed system call most immediately prior to “unable to parse file” which is just KMM’s final error to the user. What you need to find is WHY it can’t do so - presumably because it is missing some other file. This is why it is difficult to read strace output - there is no “ERROR:” to search for, you need to check the return status of every syscall.

Also - you say you used the package manager to install a part of opensp which was missing. Did you install the whole package, and just mean that the effect was to install the missing pieces? One thing to remember is that the same package (whether kmymoney, libofx, or opensp) in different versions of Ubuntu are different, due to being built with different versions of tools and libraries, so copying files from an old installation might not work. Instead of just copying /usr/share/libofx from an old installation, can you try installing it with the package manager? Same for opensp?

Hi Ostroffjh,

I used package manager to remove libofx and opensp and then re-installed them in that order. This didn’t improve things.

Now, this is where my age and senility become a little more obvious…

I ran strace then exited KMM before challenging it to do anything, then copied the terminal output into a text file.
I repeated the process with my request to import an ofx file and then looked at the difference. I’m not sure how to upload a text file so I’ve deposited the different (contiguous) lines from the failed process here.
Does this help any? (it means nothing to me :frowning: )
Alan

kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: “org.freedesktop.DBus.Error.AccessDenied”
“An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.143" (uid=1000 pid=8787 comm="/snap/kmymoney/2/usr/bin/kmymoney" label="snap.kmymoney.kmymoney (enforce)") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1521 comm="/usr/libexec/udisks2/udisksd" label="unconfined")”
kf.config.core: Created a KConfigGroup on an inaccessible config location “/etc/kubuntu-default-settings/directory-home” “Desktop Entry”
kf.config.core: Created a KConfigGroup on an inaccessible config location “/etc/kubuntu-default-settings/directory-home” “Desktop Entry”
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>00508</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
kf.notifications: Audio notification requested, but sound file from notifyrc file was not found, aborting audio notification