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
TypeError: 'NoneType' object is not subscriptable #133
Comments
I have reproduced this bug |
If the order is filled, it must have been included in a block and had its own ID. Is it just python-bitshares that doesn't return the ID? In the future we want to include such orders also in our statistics. Just thinking aloud... |
Id is returned, but price data is not. I think it's a bitshares core issue
…On Fri, 25 May 2018, 2:16 PM Marko Paasila ***@***.***> wrote:
If the order is filled, it must have been included in a block and had its
own ID. Is it just python-bitshares that doesn't return the ID? In the
future we want to include such orders also in our statistics. Just thinking
aloud...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#133 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuTOeH7hBC8l0XOXTfygSYoTlsVBF2Aks5t14WjgaJpZM4UKEsn>
.
|
Yeah the Bitshares API returns an empty result when asking for an id that doesn't exist anymore. And as you said one option is to calculate the data on our own, but instead of changing it into a 3-tuple (which would require code rewriting all over the place) we can use the existing structure of the Order object. All the data we really need to fill in the object is the data that we use, which are |
Expected Behavior
Strategy to start
Actual Behavior
Worker places all buy and sell orders but gives error then cancels all orders. I think this is because orders were filled before it finished placing all orders.
Steps to Reproduce the Problem
1.Setup in market BTS USD
2. 0.5% increment, 1% spread
3.
Specifications
2018-05-23 10:05:02,403 - Worker 1 using account kong02 on BTS/USD - ERROR - in onMarketUpdate()
Traceback (most recent call last):
File "/home/cryptokong/.local/lib/python3.5/site-packages/dexbot-0.2.0-py3.5.egg/dexbot/worker.py", line 139, in on_market
self.workers[worker_name].onMarketUpdate(data)
File "/home/cryptokong/.local/lib/python3.5/site-packages/Events-0.3-py3.5.egg/events/events.py", line 95, in call
f(*a, **kw)
File "/home/cryptokong/.local/lib/python3.5/site-packages/dexbot-0.2.0-py3.5.egg/dexbot/strategies/staggered_orders.py", line 147, in check_orders
self.place_reverse_order(order)
File "/home/cryptokong/.local/lib/python3.5/site-packages/dexbot-0.2.0-py3.5.egg/dexbot/strategies/staggered_orders.py", line 105, in place_reverse_order
if order['base']['symbol'] == self.market['base']['symbol']: # Buy order
TypeError: 'NoneType' object is not subscriptable
2018-05-23 10:05:17,479 - Worker 1 using account kong02 on BTS/USD - INFO - Canceling all orders
2018-05-23 10:05:33,360 - Worker 1 using account kong02 on BTS/USD - INFO - Worker "Worker 1" is disabled
2018-05-23 10:05:33,362 - Worker 1 using account kong02 on BTS/USD - INFO - Worker "Worker 1" is disabled
2018-05-23 10:05:33,363 - Worker 1 using account kong02 on BTS/USD - INFO - Worker "Worker 1" is disabled
The text was updated successfully, but these errors were encountered: