You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded some transactions from my bank using ofxget to a file. I I tried to parse the file with OfxParser.parse and got this: Traceback (most recent call last): File "./ofxParseTest.py", line 37, in <module> main() File "./ofxParseTest.py", line 11, in main ofx = OfxParser.parse(fileobj) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 387, in parse ofx_file = OfxPreprocessedFile(file_handle) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 147, in __init__ super(OfxPreprocessedFile, self).__init__(fh) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 78, in __init__ self.handle_encoding() File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 125, in handle_encoding codec = codecs.lookup(encoding) LookupError: unknown encoding: cpNONE
The first few lines of the file are: OFXHEADER:100 DATA:OFXSGML VERSION:160 SECURITY:NONE ENCODING:USASCII CHARSET:NONE COMPRESSION:NONE
I discovered that by changing CHARSET:NONE to CHARSET:1252 OfxParser.parse would parse the file.
The text was updated successfully, but these errors were encountered:
pcekm
linked a pull request
Feb 7, 2021
that will
close
this issue
I downloaded some transactions from my bank using ofxget to a file. I I tried to parse the file with OfxParser.parse and got this:
Traceback (most recent call last): File "./ofxParseTest.py", line 37, in <module> main() File "./ofxParseTest.py", line 11, in main ofx = OfxParser.parse(fileobj) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 387, in parse ofx_file = OfxPreprocessedFile(file_handle) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 147, in __init__ super(OfxPreprocessedFile, self).__init__(fh) File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 78, in __init__ self.handle_encoding() File "/home/yates/.local/lib/python3.7/site-packages/ofxparse/ofxparse.py", line 125, in handle_encoding codec = codecs.lookup(encoding) LookupError: unknown encoding: cpNONE
The first few lines of the file are:
OFXHEADER:100 DATA:OFXSGML VERSION:160 SECURITY:NONE ENCODING:USASCII CHARSET:NONE COMPRESSION:NONE
I discovered that by changing
CHARSET:NONE
toCHARSET:1252
OfxParser.parse would parse the file.The text was updated successfully, but these errors were encountered: