question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File "jesse_live\exchanges\LiveExchange.py", line 367, in jesse_live.exchanges.LiveExchange.LiveExchange._connect_ws._on_message

See original GitHub issue

Describe the bug

ERROR:
Traceback (most recent call last):
  File "jesse_live\exchanges\LiveExchange.py", line 367, in jesse_live.exchanges.LiveExchange.LiveExchange._connect_ws._on_message
  File "jesse_live\exchanges\Binance\BinancePerpetualFuturesMain.py", line 380, in jesse_live.exchanges.Binance.BinancePerpetualFuturesMain.BinancePerpetualFuturesMain.on_ws_message
  File "jesse_live\exchanges\Binance\BinancePerpetualFuturesMain.py", line 482, in jesse_live.exchanges.Binance.BinancePerpetualFuturesMain.BinancePerpetualFuturesMain.prepare_candle_stream
  File "jesse_live\exchanges\LiveExchange.py", line 1080, in jesse_live.exchanges.LiveExchange.LiveExchange.add_candle
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\jesse\store\state_candles.py", line 187, in add_candle
    f"Could not find the candle with timestamp {jh.timestamp_to_time(candle[0])} in the storage. Last candle's timestamp: {jh.timestamp_to_time(arr[-1])}. timeframe: {timeframe}, exchange: {exchange}, symbol: {symbol}"
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\jesse\helpers.py", line 776, in timestamp_to_time
    return str(arrow.get(timestamp / 1000))
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\arrow\api.py", line 91, in get
    return _factory.get(*args, **kwargs)
  File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\arrow\factory.py", line 267, in get
    raise TypeError(f"Cannot parse single argument of type {type(arg)!r}.")
TypeError: Cannot parse single argument of type <class 'numpy.ndarray'>.

To Reproduce live trading on Binance Perpetual Futures 2022/09/16 18:52 that led to the following message simultaneously in multiple instances (BTC-USDT, and ETH-USDT) being raised to the discord channels at 30x per minute each, until I got home to stop it around 21:00 UTC

Expected behavior Single error message, then recovery preferably without interruption otherwise restarting the strategy, or perhaps stopping.

Screenshots N/A

Enviroment (please complete the following information):

  • OS: Windows 11
  • Version jesse, version 0.39.4 and jesse_live v0.39.1

Additional context System had been running for 3 days on a 1min timeframe. Previously, same setup had been running for 2 weeks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
qwptocommented, Sep 17, 2022
0reactions
qwptocommented, Sep 22, 2022

Has been running with with multiple instances using a redis and postsgres for each for 2 days, the candle error with the exchange occured and did not cause a problem like before. So it seems this was the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found