ofxtools
ofxtools copied to clipboard
Error "OFXSpecError: must contain exactly 1 of ['signonmsgsrqv1', 'signonmsgsrsv1'] (not 0)", but there are SIGNONMSGSRSV1 tags
When attempting to import and convert the attached ofx file using
parser = OFXTree()
with open("./test1.ofx", "rb") as fh:
parser.parse(fh)
parser.convert()
I get the following error
OFXSpecError('OFX(signonmsgsrqv1=None, signonmsgsrsv1=None): must contain exactly 1 of [['signonmsgsrqv1', 'signonmsgsrsv1']] (not 0)')
I suspect it is a formatting issue on my side. The tag <signonmsgsrsv1> exists in the document but the error suggests it is not found.
Huh, weird. What version of ofxtools are you using?
OFXTools = 0.9.5 Python = 3.9.12
This is on current master.
Python 3.11.6 (main, Oct 3 2023, 00:00:00) [GCC 12.3.1 20230508 (Red Hat 12.3.1-1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import ofxtools
In [2]: parser = ofxtools.OFXTree()
...: with open("/home/csingley/Downloads/test1.ofx", "rb") as fh:
...: parser.parse(fh)
...: parser.convert()
Out[2]: <OFX len(statements)=1 len(securities)=0>
I'll give it a try with both OFXTools 0.9.5 and python 3.11 and try python 3.9 with the master branch.