codereverser / casparser

Parser for Consolidated Account Statements (CAS) generated from CAMS/Karvy/Kfintech
MIT License
138 stars 63 forks source link

Error while generating capital gains report with Dividend payout scheme #48

Closed CodeShikra closed 3 years ago

CodeShikra commented 3 years ago

Getting the following error

File "\lib\site-packages\casparser\analysis\gains.py", line 192, in merge_transactions merged_transactions[dt].units += txn["units"] TypeError: unsupported operand type(s) for +=: 'decimal.Decimal' and 'NoneType'

Dividend payout transactions have nothing in the "Units" column as shown in screenshot below (Only "Amount" column)
image

codereverser commented 3 years ago

fix being tested in #47

codereverser commented 3 years ago

Can you please try testing with the pre-release version 0.5.2b1?

pip install casparser==0.5.2b1
CodeShikra commented 3 years ago

The issue is resolved and I can see the Capital Gains Statement table being printed on the console

codereverser commented 3 years ago

fixed in #7 & v0.5.2 will be released today