Bug 507806

Summary: Import ofx file doesnt work
Product: [Applications] kmymoney Reporter: PMICHELIN <patrick.michelin>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DOWNSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.1.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description PMICHELIN 2025-08-03 09:34:54 UTC
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 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
Comment 1 Thomas Baumgart 2025-08-03 09:46:18 UTC
The missing DTDs are part of the libofx packages. Malheureusement, if they are missing for you it's not much we can do about. You can use

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

to search them on your disc. For me both show up in /usr/share/libofx/dtd where libofx expects them.
Comment 2 PMICHELIN 2025-08-03 16:23:34 UTC
this 2 files exists in my configuration :
# find /usr -name opensp.dcl
/usr/share/libofx7/libofx/dtd/opensp.dcl
# find /usr -name ofx160.dtd
/usr/share/libofx7/libofx/dtd/ofx160.dtd
#
Comment 3 Thomas Baumgart 2025-08-03 17:54:00 UTC
Yes, but apparently the libofx functions called by KMyMoney do not not find them. This then is more of a problem introduced by packaging of your distro. Try to find out were libofx (when run by KMyMoney) tries to locate those files. I would use the strace tool with -e trace=file as option and search for those filenames in the output.