Closed ifrond closed 1 year ago
I am not a python developer but I suppose the problem is here https://github.com/jamsix/ib-edavki/blob/d2cf732728dbb65b3b7e4f010b80bbd380dacd64/ib_edavki.py#L74 lastWorkingDateStr = lastWorkingDate.strftime("%Y%m%d") maybe change to lastWorkingDateStr = lastWorkingDate.strftime("%Y-%m-%d")
Živjo,
ta del kode ne bi smel bit problem, ker so ključi v rates
v obliki brez pomišljajev:
https://github.com/jamsix/ib-edavki/blob/d2cf732728dbb65b3b7e4f010b80bbd380dacd64/ib_edavki.py#L215
Poskusi izbrisat bsrate-*.xml
in ponovno pognat.
you are right, the problem was in currency that wasn't at bsrate-*.xml in my case that currency was CNH i think you need to check exchange twice - for date and then for the currence and correct the error message to fit the actual problem
Thanks for coming back witht this explanation. Solution to the problem is a bit trickier that it seems.
CNH
rates.CNY
rates.CNY
and CNH
rates can in theory diverge, should we just ignore that?For now I recommend you simply remove that entry or change CNH
to some other value in your IB XML files and recalculate that entry manually. We will look into this, but no promises that it will be done before the end of this year's tax season.
I would just silently replace CNH to CNY. Exchage rate is about 0.999. Thank you for your help.
@ifrond this should be fixed now with https://github.com/jamsix/ib-edavki/commit/2a23c4da509412d7a4bf73d292541c14ead9b775 It's not an ideal fix as it assumes CNH/CNY = 1, but lacking a better guidance, it should be close enough.
Thank you
Error: There is no exchange rate for 20220128 (this is the first trade date) Maybe dateformat problem because in xml export file all dates have format 20220128 but in bsrate-20221130.xml all dates have format 2022-01-28