Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calc_profit() TypeError: unsupported operand type(s) for *: 'float' and 'NoneType' #567

Closed
bitphage opened this issue Apr 22, 2019 · 0 comments
Assignees
Labels
[3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours

Comments

@bitphage
Copy link
Collaborator

From #563

Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.6/site-packages/dexbot-0.10.1-py3.6.egg/dexbot/worker.py", line 76, in init_workers
view=self.view
File "/home/cryptokong/.local/lib/python3.6/site-packages/dexbot-0.10.1-py3.6.egg/dexbot/strategies/staggered_orders.py", line 115, in init
self.update_gui_profit()
File "/home/cryptokong/.local/lib/python3.6/site-packages/dexbot-0.10.1-py3.6.egg/dexbot/strategies/base.py", line 1390, in update_gui_profit
profit = self.calc_profit()
File "/home/cryptokong/.local/lib/python3.6/site-packages/dexbot-0.10.1-py3.6.egg/dexbot/strategies/base.py", line 1167, in calc_profit
max_quantity_base = base_balance + quote_balance * center_price
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

The problem caused by the error in conditional expression if not (old_center_price or center_price)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours
Projects
None yet
Development

No branches or pull requests

1 participant