This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMyMoney 5.1.3: OFX Unable to parse file

Tags: None
(comma "," separated)
sandyvee
Registered Member
Posts
14
Karma
0
Hi all. I'm currently using KMyMoney v 5.1.3-64a73e8e4 and it's working just fine (Both Windows 10 and Ubuntu 20.04)

So I wanted to try out the latest and the OFX importer is not working. I have installed 5.1.3-caa1baff4 from file kmymoney-5.1.1647-windows-cl-mvsc2019-x86_64.exe
When I try to import an OFX or connect to my bank using the "Update my Account" I get a parse error:

Unable to import 'c:/Users/mb795b/Appdata/Locat/Temp/kymymoney.QZwqAz" using the OFX importer plugin. The plugin returned the following error:

Unable to parse file.

Can someone help on this?
TIA
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
First step would be to actually look at that file, to be sure it really is a valid OFX file. While the KMM error message is showing (the file will get deleted once you click OK) navigate to that directory and try to open the file in an editor (notepad or wordpad should work, as OFX is a plain text file.) One other thing to try is to download the OFX file instead of doing a direct connect update. That way you have the file to examine. If you want to try the latest 5.1 on Linux, you can use the Appimage version (https://kmymoney.org/appimage.html)
sandyvee
Registered Member
Posts
14
Karma
0
Not being an OFX expert, not sure what this issue is but have seen it before in older versions of KMyMoney. So I have an OFX file that will import to my current version, but not the current nightly version.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Not a solution, but maybe some indicators: Between those two versions there was no code change on the KMyMoney ofx importer. Looking at libofx that is different. For the Windows builds there were several updates of libofx (we build it from the released tarballs) between the versions you mentioned. A file is parsed and as soon as libofx finds an account or statement entry and calls the respective KMyMoney routine the file is valid (which means the error message is not generated any more).

Now it would be interesting to know, what happens when the file is parsed. KMyMoney prints messages to the console which show up, when you start KMyMoney from a command line window. At least the ones printed when you start the OFX import are of interest for further analysis. Make sure that they don't contain personal information before you post them here.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
sandyvee
Registered Member
Posts
14
Karma
0
Here is some output from the cmd window console when I invoke the "import OFX"

reading file
start parsing file
startDocument
reading securities
endDocument
Cost center model created with items 0
Payees model created with items 0
kf.kio.core: "C:/Program Files/KMyMoney/bin/kf5/kio/file.dll" doesn't implement WorkerFactory?
kf.kio.core: "C:/Program Files/KMyMoney/bin/kf5/kio/file.dll" doesn't implement WorkerFactory?
OfxImporterPlugin::slotImportFile
setup callback routines
process data
LibOFX ERROR: MainContainer is NULL trying to add element SUxCT
(Above message occurred on Line 7, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element Fï
(Above message occurred on Line 14, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element SSùD
(Above message occurred on Line 15, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element SOGV ╟ï►ï≡ï└ï
(Above message occurred on Line 16, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element SUxCT
(Above message occurred on Line 23, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element BAFïɲ!ïPïPï
(Above message occurred on Line 30, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element STPαïQ
(Above message occurred on Line 40, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element STPαïQ
(Above message occurred on Line 47, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element STPαïQ
(Above message occurred on Line 54, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element BTLïɲíï≡ï└ï
(Above message occurred on Line 55, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element LELïpï ²R
(Above message occurred on Line 59, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element SR¶`ï
(Above message occurred on Line 60, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element STSï/ï(
(Above message occurred on Line 61, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element BMRïáï◄ïRNRï
(Above message occurred on Line 62, Column 1)
LibOFX ERROR: MainContainer is NULL trying to add element Oïû
(Above message occurred on Line 63, Column 1)
process data done
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
I'm curious about those elements with non latin characters in the names. What is your locale? What country is the bank in? Have you looked at the OFX file in a text editor to see if anything looks odd? Given the messages, at least libofx recognized the file as OFX, and there are certainly elements which do not need to be recognized, but I would expect to be able to recognize the element names. Also, can you confirm that the same OFX file was correctly imported by the first version you mentioned?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
This bahavior has already been reported on our bugtracker. AFAIR, the investigation has shown, that even the ofxdump utility provided with LibOFX shows the same problem. Where did you get the version of KMyMoney from? Can you try, if using the daily build stable version works any better/worse? This daily build is based on the official 5.1.3 source code release and contains all changes/fixes made since then.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
sandyvee
Registered Member
Posts
14
Karma
0
I got my copy of KMyMoney from here: https://binary-factory.kde.org/job/KMyM ... /artifact/
and it was release 1647.

I tried your download link which downloaded: kmymoney-5.1-1654-windows-cl-msvc2019-x86_64 (01/20/2023) and installed
Still no OFX import (Cannot parse file)

I used that same file to import into my OLDER version (mentioned earlier) and it imported successfully.
rblackwell
Registered Member
Posts
124
Karma
0
OS
I'll add my name against this issue. I'm seeing the same problem as @sandyvee with version Version 5.1.3-96a32bc38 installed from the file named kmymoney-5.1-1653-windows-cl-msvc2019-x86_64.exe.

I'm running Windows 11
rchristo
Registered Member
Posts
2
Karma
0
Adding my name to the issue too.

Same issue here, with Version 5.1.3-d84bca974 from kmymoney-5.1-1662-windows-cl-msvc2019-x86_64. Installed on Windows 11. The OFX file I am trying to import worked successfully on a previous version.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
The latest builds for Windows on the KDE binary factory (stable, master) are now fixed and work with OFX (again).

The root cause was the configuration of LibOFX's configuration for the interface to the underlying OpenSP library. OpenSP is not build with multibyte support on the KDE binary factory but the LibOFX build configures the interface to OpenSP to use multibyte by default. This has now been overridden for the windows builds.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
rblackwell
Registered Member
Posts
124
Karma
0
OS
ipwizard wrote:The latest builds for Windows on the KDE binary factory (stable, master) are now fixed and work with OFX (again)..


Thank you for letting us know. Build 1671 has been downloaded, installed and is working perfectly.

Much appreciated.
rchristo
Registered Member
Posts
2
Karma
0
Ditto, here too. I can confirm that I was able to successfully import a QFX file with build 1672. Thank you for all your efforts to resolve this.

Cheers.
sandyvee
Registered Member
Posts
14
Karma
0
Installed: 5.1.3-7ab4374e7 kmymoney-5.1-1674-windows-cl-msvc2019-x86_64
and the OFX importer is working for me too.

Thanks to all for fixing this
Cheers.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]