-
Notifications
You must be signed in to change notification settings - Fork 39
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
Vanguard unknown entity type error when dealing with CDs #75
Comments
Hi, thanks for filling! This should be an easy fix, likely just adding the type to the right place in the importer, and adding the unit test. Would you be up for taking a stab at a fix? Do let me know. Thanks! |
I can take a shot. I'm not a python programmer so some of the idioms are not clear to me. It seems like entities are hard coded at least 2 places: https://github.com/redstreet/beancount_reds_importers/blob/main/beancount_reds_importers/libtransactionbuilder/investments.py#L366-L379 and https://github.com/redstreet/beancount_reds_importers/blob/main/beancount_reds_importers/libtransactionbuilder/investments.py#L102-L126 So it doesn't seem like its just a vanguard importer issue. The tests though are defined at the financial institution level it seems? So i guess do I just add the new entity type to the transaction builder library and then test it at the vanguard level? |
All of that is exactly right :). If you'd like to do this, I'd recommend starting with testing by copying the set of files here to a set with a new name, replacing the ofx with your test case, and running Alternatively, you're also welcome to simply send me an anonymized, valid |
Sorry I haven't gotten to this. I tried a few times to figure out how to get going on the code base. I think I'm close but probably won't get back to this issue for a few months. |
No worries, thanks for the note! I can fix it. From above:
|
When running an import on a vanguard ofx document that has CDs in it I get
ERROR:root:Importer beancount_reds_importers.vanguard.Importer.extract() raised an unexpected error: Unknown entry type
Traceback (most recent call last):
File "/Users/kaseyklipsch/pf/.venv/lib/python3.11/site-packages/beancount/ingest/extract.py", line 182, in extract
new_entries = extract_from_file(
^^^^^^^^^^^^^^^^^^
File "/Users/kaseyklipsch/pf/.venv/lib/python3.11/site-packages/beancount/ingest/extract.py", line 67, in extract_from_file
new_entries = importer.extract(file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kaseyklipsch/pf/.venv/lib/python3.11/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 423, in extract
new_entries += self.extract_transactions(file, counter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kaseyklipsch/pf/.venv/lib/python3.11/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 351, in extract_transactions
raise Exception('Unknown entry type')
An example line:
20688946420230613160000.000[-5:EST]20230615160000.000[-5:EST]BUY02007GP98CUSIP20000.0100.0-20000.0CASHCASH0.0
The text was updated successfully, but these errors were encountered: