Skip to content

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

@bitphage

Description

@bitphage

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)

Metadata

Metadata

Assignees

Labels

[3] Type: Bug[5] Small TaskIndicates size of task. Est. between one and two hours

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions