hummingbot / deploy

This repository provides various examples of how to deploy Hummingbot using Docker.
Apache License 2.0
56 stars 54 forks source link

PMM Dynamic - Getting ValueError: If using all scalar values, you must pass an index #51

Open rapcmia opened 1 week ago

rapcmia commented 1 week ago

Describe the bug

When testing a PR and compare with the latest deploy version, found this error when setting up a market on kucoin and binance

image

# dashboard logs
2024-06-26 12:36:04.033 Uncaught app exception
Traceback (most recent call last):
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)
  File "/home/dashboard/frontend/pages/config/pmm_dynamic/app.py", line 40, in <module>
    candles = get_candles(connector_name=inputs["candles_connector"], trading_pair=inputs["candles_trading_pair"], interval=inputs["interval"], days=days_to_visualize)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 168, in wrapper
    return cached_func(*args, **kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 197, in __call__
    return self._get_or_create_cached_value(args, kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 224, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/caching/cache_utils.py", line 280, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
  File "/home/dashboard/frontend/pages/config/utils.py", line 23, in get_candles
    df = pd.DataFrame(backend_client.get_historical_candles(connector_name, trading_pair, interval,
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/frame.py", line 778, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
    return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
    index = _extract_index(arrays)
  File "/opt/conda/envs/dashboard/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 667, in _extract_index
    raise ValueError("If using all scalar values, you must pass an index")
ValueError: If using all scalar values, you must pass an index
# backend logs
INFO:     192.168.0.3:33054 - "GET /is-docker-running HTTP/1.1" 200 OK
INFO:     192.168.0.3:33056 - "GET /all-controller-configs HTTP/1.1" 200 OK
2024-06-26 12:36:04,025 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0xffff7c352590>
2024-06-26 12:36:04,026 - asyncio - ERROR - Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0xffff7c358760>, 6730.242969143)]']
connector: <aiohttp.connector.TCPConnector object at 0xffff7c353d90>
INFO:     192.168.0.3:33062 - "POST /historical-candles HTTP/1.1" 200 OK

Check traceback seems to be pointing to historical candles. Tried to check if we can reproduce using data and MACD_BB V1 image

Steps to reproduce bug

  1. Clone latest deploy version then setup bash setup.sh
  2. Go to Dashboard page
  3. Go to Config Generator then PMM Dynamic (on this test we used kucoin XCAD-USDT, binance FIRO-USDT) then observe error on setup
  4. Go to data then download candles for the same market and it would return same error
Christopher-Reilly commented 6 days ago

Yes I am getting this error as well anytime I try to load candlestick charts both on hummingbot deploy and dashboard/backend-api/hummingbot repos. Following. Screenshot 2024-07-01 at 1 54 31 PM