Closed g4m3r0 closed 9 months ago
I've encountered a divide by zero exception in src/book.py (Line 1676) which appears to happen when the price could not be retrieved.
In my fork I just set the buy_op.buying_cost to 1 as hotfix (see https://github.com/g4m3r0/CoinTaxman/commit/612a6764f59909915f3337cbecb53b3e83169fb8#diff-484c46f73c8e2db2113b8975f07e98907bdc9ccd12e7f8dd47b4a53ed1eb8d26L1676).
# Divide by zero hotfix (seems to happen when the price could not be retrieved) if (buy_op.buying_cost == 0): buy_op.buying_cost = 1
I think that we shouldn't silently assume the price if it couldn't been retrieved. A warning might be in order.
But eventhough, just guessing the price seems like a bad idea.
I've encountered a divide by zero exception in src/book.py (Line 1676) which appears to happen when the price could not be retrieved.
In my fork I just set the buy_op.buying_cost to 1 as hotfix (see https://github.com/g4m3r0/CoinTaxman/commit/612a6764f59909915f3337cbecb53b3e83169fb8#diff-484c46f73c8e2db2113b8975f07e98907bdc9ccd12e7f8dd47b4a53ed1eb8d26L1676).