csingley / ofxtools

Python OFX Library
Other
301 stars 68 forks source link

OFX version 1.6 causes OFXHeaderError #49

Closed chbndrhnns closed 5 years ago

chbndrhnns commented 5 years ago

My online banking tool upgraded its OFX export to 1.6 according to the release notes. Since then, I am receiving the following error when trying to parse an exported file.

Error

ofxtools.header.OFXHeaderError: OFX header is malformed: OFXHEADER:100

DATA:OFXSGML
VERSION:160
SECURITY:NONE
ENCODING:UTF-8
CHARSET:NONE
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE

Here is a sanitized example file (renamed to txt): MoneyMoney-o7LV7S.txt

csingley commented 5 years ago

It's actually the ENCODING field... the header regex was written wrong, and only accepted alpha characters in that position. This is actually the first time I've seen OFX version 1 using UTF-8 encoding.

This is fixed in f7cf08c

Thanks for the bug report; sorry for the delay in fixing it.