Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETrade Unknown entity type #69

Open
cfarley137 opened this issue Jun 15, 2023 · 1 comment
Open

ETrade Unknown entity type #69

cfarley137 opened this issue Jun 15, 2023 · 1 comment

Comments

@cfarley137
Copy link

cfarley137 commented Jun 15, 2023

I received an OFX file from E*Trade that contains an unexpected entity, and this breaks the beancount_reds_importers code like so:

ERROR: unknown entry type: jrnlsec
ERROR:root:Importer beancount_reds_importers.etrade.Importer.extract() raised an unexpected error: Unknown entry type
Traceback (most recent call last):
File "/Users/chris/venv/lib/python3.11/site-packages/beancount/ingest/extract.py", line 182, in extract
new_entries = extract_from_file(
^^^^^^^^^^^^^^^^^^
File "/Users/chris/venv/lib/python3.11/site-packages/beancount/ingest/extract.py", line 67, in extract_from_file
new_entries = importer.extract(file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/chris/venv/lib/python3.11/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 422, in extract
new_entries += self.extract_transactions(file, counter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/chris/venv/lib/python3.11/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 350, in extract_transactions
raise Exception('Unknown entry type')
Exception: Unknown entry type
;; -- mode: beancount --

FWIW, I just added 'jrnlsec' to the list of entities on line 146 of investments.py

The line appeared in my OFX after an incoming ACATS transfer and it looks like this:
<JRNLSEC> <INVTRAN> <FITID>230614_JRL_0 <DTTRADE>20230614170000.000 <MEMO>Journalling security holdings for VTEB </INVTRAN> <SECID> <UNIQUEID>922907746 <UNIQUEIDTYPE>CUSIP </SECID> <SUBACCTTO>CASH <SUBACCTFROM>MARGIN <UNITS>100 </JRNLSEC>

@redstreet
Copy link
Owner

Good to know, thanks for reporting this!

The etrade impiorter is yet to have an ofx unit test. I'll leave this ticket open until that's put in, and the line above you posted can become a part of the unit test.

@redstreet redstreet changed the title Unknown entity type ETrad4e Unknown entity type Jul 12, 2023
@redstreet redstreet changed the title ETrad4e Unknown entity type ETrade Unknown entity type Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants