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

KeyError: 'operation_results' #536

Closed
bitphage opened this issue Apr 4, 2019 · 2 comments
Closed

KeyError: 'operation_results' #536

bitphage opened this issue Apr 4, 2019 · 2 comments

Comments

@bitphage
Copy link
Collaborator

bitphage commented Apr 4, 2019

Rare condition happening inside of python-bitshares, tx without "operation_results". Need to fix upstream or add a workaround inside dexbot.

2019-04-04 03:14:25,582 (base:1107) - worker10 - INFO - Placing a buy order with 126.73298 RUBLE @ 8.78424792
2019-04-04 03:14:26,533 (worker:127) - worker10 - ERROR - in ontick()
Traceback (most recent call last):
  File "/home/vvk/devel/DEXBot-prod/dexbot/worker.py", line 125, in on_block
    self.workers[worker_name].ontick(data)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.6/site-packages/Events-0.3-py3.6.egg/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 1928, in tick
    self.maintain_strategy()
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 206, in maintain_strategy
    self.replace_virtual_order_with_real(self.virtual_buy_orders[0])
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 562, in replace_virtual_order_with_real
    new_order = self.place_market_buy_order(quote_amount, price, returnOrderId=True)
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/base.py", line 1119, in place_market_buy_order
    **kwargs
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/base.py", line 1202, in retry_action
    return action(*args, **kwargs)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.6/site-packages/bitshares-0.2.1-py3.6.egg/bitshares/market.py", line 463, in buy
    tx["orderid"] = tx["operation_results"][0][1]
KeyError: 'operation_results'
2019-04-04 03:14:26,539 (worker:141) - worker10 - ERROR - Worker "worker10" is disabled
@bitphage
Copy link
Collaborator Author

bitphage commented Apr 4, 2019

Upstream issue bitshares/python-bitshares#229

@bitphage
Copy link
Collaborator Author

Reopen if will happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant