You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please advise on how to fix this permanently showing up error:
future: <Task finished name='Task-3090' coro=<Bot.on_market_stream_event() done, defined at /home/.../passivbot.py:802> exception=TypeError('tuple indices must be integers or slices, not str')>
Traceback (most recent call last):
File "/home/.../passivbot.py", line 821, in on_market_stream_event
await self.cancel_and_create()
File "/home/.../passivbot.py", line 796, in cancel_and_create
results.append(await self.create_orders(to_create[: self.max_n_orders_per_batch]))
File "/home/.../passivbot.py", line 351, in create_orders
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
File "/home/.../passivbot.py", line 351, in
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
TypeError: tuple indices must be integers or slices, not str
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Then, after an execution of "cancel order" :
(2023-02-07T08:29:52 INFO short: -3437.0 @ 0.09142 sWE: 1.1221 pprc diff -0.001 EMAs: [0.091306, 0.091306, 0.091306] e 0.0 @ 0.0 | c 687.0 @ 0.09124
2023-02-07T08:29:52 INFO updating position with REST API before creating initial entries. Last price 0.09132
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09124
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09118
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09112)
passivbot.py shows yet another error:
ERROR error handling user stream event, tuple indices must be integers or slices, not str
Traceback (most recent call last):
File "/home/.../passivbot.py", line 982, in on_user_stream_event
await self.cancel_and_create()
File "/home/.../passivbot.py", line 796, in cancel_and_create
results.append(await self.create_orders(to_create[: self.max_n_orders_per_batch]))
File "/home/.../passivbot.py", line 351, in create_orders
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
File "/home/..../passivbot.py", line 351, in
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
TypeError: tuple indices must be integers or slices, not str
These two errors fix would be highly appreciated.
The text was updated successfully, but these errors were encountered:
batareikin
changed the title
Task exception was never retrieved (working with Bybit)
TypeError: tuple indices must be integers or slices, not str (Bybit)
Feb 7, 2023
Could you please advise on how to fix this permanently showing up error:
future: <Task finished name='Task-3090' coro=<Bot.on_market_stream_event() done, defined at /home/.../passivbot.py:802> exception=TypeError('tuple indices must be integers or slices, not str')>
Traceback (most recent call last):
File "/home/.../passivbot.py", line 821, in on_market_stream_event
await self.cancel_and_create()
File "/home/.../passivbot.py", line 796, in cancel_and_create
results.append(await self.create_orders(to_create[: self.max_n_orders_per_batch]))
File "/home/.../passivbot.py", line 351, in create_orders
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
File "/home/.../passivbot.py", line 351, in
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
TypeError: tuple indices must be integers or slices, not str
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Then, after an execution of "cancel order" :
(2023-02-07T08:29:52 INFO short: -3437.0 @ 0.09142 sWE: 1.1221 pprc diff -0.001 EMAs: [0.091306, 0.091306, 0.091306] e 0.0 @ 0.0 | c 687.0 @ 0.09124
2023-02-07T08:29:52 INFO updating position with REST API before creating initial entries. Last price 0.09132
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09124
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09118
2023-02-07T08:29:55 INFO cancelled order DOGEUSDT buy short 687.0 0.09112)
passivbot.py shows yet another error:
ERROR error handling user stream event, tuple indices must be integers or slices, not str
Traceback (most recent call last):
File "/home/.../passivbot.py", line 982, in on_user_stream_event
await self.cancel_and_create()
File "/home/.../passivbot.py", line 796, in cancel_and_create
results.append(await self.create_orders(to_create[: self.max_n_orders_per_batch]))
File "/home/.../passivbot.py", line 351, in create_orders
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
File "/home/..../passivbot.py", line 351, in
for order in sorted(orders, key=lambda x: calc_diff(x["price"], self.price)):
TypeError: tuple indices must be integers or slices, not str
These two errors fix would be highly appreciated.
The text was updated successfully, but these errors were encountered: