redstreet / beancount_reds_plugins Goto Github PK
View Code? Open in Web Editor NEWMiscellaneous plugins for Beancount double entry accounting
License: GNU General Public License v3.0
Miscellaneous plugins for Beancount double entry accounting
License: GNU General Public License v3.0
I'm using Fidelity for most of my financial life. Part of that includes using their cash management account and a brokerage account that acts like a checking account.
I'm using the importers for the investment brokerage accounts just fine, but when I try to apply a banking.Importer
for the more "bank"-like brokerage accounts I get the error that InvestmentStatement object has no attribute 'balance'
. Traceback at the bottom.
I tried creating a custom importer for the "banking" accounts with self.include_balances = False
to skip adding balances, but still get the same error.
class Importer(banking.Importer, ofxreader.Importer):
IMPORTER_NAME = "Fidelity Banking Accounts"
def custom_init(self):
if not self.custom_init_run:
self.max_rounding_error = 0.04
self.filename_pattern_def = "fidelity_banking*"
self.includes_balances = False
self.custom_init_run = True
oft-summarize
works, but seems to leave the balance as None
:
Statement info: 2022-12-01 00:00:00 -- 2022-12-29 00:00:00. Bal: []
I don't mind not having balance info for these accounts. Would it be acceptable to try and warn for this behavior, or is there something likely wrong with OFX file?
ERROR:root:Importer personal_finance.ingestors.beancount_reds_importers.fidelity_banking.Importer.extract() raised an unexpected error: 'InvestmentStatement' object has no attribute 'balance'
Traceback (most recent call last):
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/beancount/ingest/extract.py", line 182, in extract
new_entries = extract_from_file(
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/beancount/ingest/extract.py", line 67, in extract_from_file
new_entries = importer.extract(file, **kwargs)
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/smart_importer/hooks.py", line 40, in patched_extract_method
imported_entries = unpatched_extract(
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/banking.py", line 119, in extract
new_entries += self.extract_balance(file, counter)
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/banking.py", line 67, in extract_balance
for bal in self.get_balance_statement():
File "~/pypoetry/virtualenvs/personal-finance-Iy5H7pvA-py3.9/lib/python3.9/site-packages/beancount_reds_importers/libreader/ofxreader.py", line 56, in get_balance_statement
yield Balance(date, self.ofx_account.statement.balance)
AttributeError: 'InvestmentStatement' object has no attribute 'balance'
Here's an example of a project that shows an error in fava about the parent account getting closed before the opening date. I think the parent account does not get opened properly, or possibly it is assigned an opening date that is not earlier than the children's date.
option "operating_currency" "USD"
option "conversion_currency" "USD"
plugin "beancount.plugins.auto_accounts"
plugin "beancount_reds_plugins.autoclose_tree.autoclose_tree"
2021-06-17 close Expenses:Non-Retirement:Auto:Fit
2019-01-01 * "Transaction"
Expenses:Non-Retirement:Auto:Fit:Insurance 10 USD
Expenses:Non-Retirement:Auto:Fit:Gas 20 USD
Assets:Transfer
capital_gains_classifier needs to open new accounts as needed. However, it doesn't apply strict rules to determine what accounts to open and what to not, based on the plugin config supplied. Example TBD.
Hello I'm trying the zerosum plugin to handle duplicates
I have multiple bank accounts and in one of them i have multiple (lets say 10) sub accounts. I have imported all these accounts for this year so far into one single file
2023bank.bean
2023OtherBank.bean
2023YetAnotherBank.bean
I tried to use the plugin on some of the accounts to try and detect duplicates from transactions between all the accounts, like this:
plugin "beancount_reds_plugins.zerosum.zerosum" "{
'zerosum_accounts' : {
'Assets:B:Bank1' : ('', 1),
'Assets:B:Bank2' : ('', 1),
'Assets:B:Bank3' : ('', 1),
'Assets:B:Bank4' : ('', 1),
'Assets:B:Bank5' : ('', 1),
'Assets:B:Bank6' : ('', 1),
'Assets:B:Bank7' : ('', 1),
'Assets:B:Bank8' : ('', 1),
'Assets:B:Bank9' : ('', 1),
'Assets:B:Bankj10' : ('', 1),
'Assets:B:OtherBank' : ('', 1),
'Assets:B:YetAnotherBank' : ('', 1),
'Assets:ZeroSum:Transfers' : ('', 1),
},
'account_name_replace' : ('ZeroSum', 'ZS-Matched')
}"
First I go some errors, but later just nothing until I noticed that the cpu core goes to 100% use and my laptop runs warm until I think it is warm enough and I cancel the process after some minutes.
I tried reducing the time span to 1, because all transactions are between my accounts and usually arrive the same day in the target account anyways.
Any Idea where I should look to make this work?
Or is this plugin not meant for a use-case like this?
This print breaks CSV output when using default config.
$ bean-query -f csv <(echo 'plugin "beancount_reds_plugins.effective_date.effective_date" ""') "SELECT *"
Using default config
date,flag,payee,narration,position
Receiving this error, but can't make sense of it. Can anyone help?
File "/usr/local/lib/python3.7/site-packages/beancount_reds_plugins/effective_date/effective_date.py", line 118, in effective_date
holding_account = holding_accts[found_acct]['earlier']
KeyError: ''
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.