Skip to content

Error message in Beancount 2.3.3 #7

Open
@prabusw

Description

Martin,

When i try to run the code, i'm getting the below error message in Beancount 2.3.3... I can send you the ledger file privately, if you mail me.

$:~/beancount/beangrow-master/beangrow$ python compute_returns.py ~prabu/beancount/prabu/prabu2021_02_20.beancount config.pbtxt return_reports
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
Traceback (most recent call last):
File "compute_returns.py", line 105, in
main()
File "compute_returns.py", line 100, in main
reports.write_price_directives(path.join(output_prices, "prices.beancount"),
File "/home/prabu/beancount/beangrow-master/beangrow/reports.py", line 406, in write_price_directives
days_late = (required_date - actual_date).days
TypeError: unsupported operand type(s) for -: 'datetime.date' and 'NoneType'

Here is the verbose output
prabu@homepc-lm:~/beancount/beangrow-master/beangrow$ python compute_returns.py ~prabu/beancount/prabu/prabu2021_02_20.beancount config.pbtxt return_reports -v
INFO : Reading ledger: /home/prabu/beancount/prabu/prabu2021_02_20.beancount
INFO : Processing account: Assets:TH:Investment:KGI:INTUCH-R
INFO : Processing account: Assets:US:Investment:ETrade:BP
INFO : Processing account: Assets:US:Investment:ETrade:CVX
INFO : Processing account: Assets:US:Investment:ETrade:EQIX
INFO : Processing account: Assets:US:Investment:ETrade:IXC
INFO : Processing account: Assets:US:Investment:ETrade:TOT
INFO : Processing account: Assets:US:Investment:ETrade:RDS-B
INFO : Processing account: Assets:US:Investment:ETrade:XLE
INFO : Processing account: Assets:US:Investment:ETrade:XOM
INFO : Writing details file: return_reports/investments/Assets_TH_Investment_KGI_INTUCH-R.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_BP.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_CVX.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_EQIX.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_IXC.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_TOT.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_RDS-B.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_XLE.org
INFO : Writing details file: return_reports/investments/Assets_US_Investment_ETrade_XOM.org
INFO : Writing returns dir for strategy:GlobalEnergy: return_reports/groups/strategy:GlobalEnergy
DEBUG : top of axes not in the figure, so title not moved
DEBUG : top of axes not in the figure, so title not moved
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
INFO : Writing returns dir for strategy:GlobalEnergy: return_reports/groups/strategy:GlobalEnergy.org
INFO : Writing returns dir for currency.EQIX: return_reports/groups/currency.EQIX
DEBUG : top of axes not in the figure, so title not moved
DEBUG : top of axes not in the figure, so title not moved
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
INFO : Writing returns dir for currency.EQIX: return_reports/groups/currency.EQIX.org
INFO : Writing returns dir for Thailand.Intuch: return_reports/groups/Thailand.Intuch
DEBUG : top of axes not in the figure, so title not moved
DEBUG : top of axes not in the figure, so title not moved
/home/prabu/beancount/beangrow-master/beangrow/returns.py:63: RuntimeWarning: invalid value encountered in power
return np.sum(cash_flows / (1. + irr) ** years)
INFO : Writing returns dir for Thailand.Intuch: return_reports/groups/Thailand.Intuch.org
INFO : Producing price page for ('BP', 'USD')
INFO : Producing price page for ('CVX', 'USD')
INFO : Producing price page for ('EQIX', 'USD')
INFO : Producing price page for ('INTUCH-R', 'THB')
INFO : Producing price page for ('IXC', 'USD')
INFO : Producing price page for ('RDS-B', 'USD')
INFO : Producing price page for ('TOT', 'USD')
INFO : Producing price page for ('XLE', 'USD')
INFO : Producing price page for ('XOM', 'USD')
Traceback (most recent call last):
File "compute_returns.py", line 105, in
main()
File "compute_returns.py", line 100, in main
reports.write_price_directives(path.join(output_prices, "prices.beancount"),
File "/home/prabu/beancount/beangrow-master/beangrow/reports.py", line 406, in write_price_directives
days_late = (required_date - actual_date).days
TypeError: unsupported operand type(s) for -: 'datetime.date' and 'NoneType'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions