dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Error StreamlitAPIException when checking balance in Portfolio page when account has 0 balance

Open lanphan opened this issue 1 year ago • 8 comments

Describe the bug

Portfolio page doesn't show "Select tokens" field, instead it shows error below:

StreamlitAPIException: Every Multiselect default value must exist in options

Traceback:
File "/home/dashboard/frontend/pages/orchestration/portfolio/app.py", line 84, in <module>
    tokens_available = st.multiselect("Select Tokens", token_options, token_options)

Steps to reproduce

  1. Open Dashboard
  2. Following instruction from https://hummingbot.org/installation/hummingbot-deploy/quickstart/#managing-instances , after entering Credential (binance perpetual), got error in Portfolio page
Screenshot 2024-07-06 at 09 45 13 Screenshot 2024-07-06 at 09 45 20

Release version

latest version

Type of installation

Docker

Attach required files

No response

lanphan avatar Jul 06 '24 02:07 lanphan

I think I found the root cause of this bug: when my sub account doesn't have any asset, Portfoilo page will show that bug. After I deposit some USDT, the error has gone, and show "Select tokens: USDT" in my Portfolio page. --> I think we need to update code to cover case when user account doesn't have any asset

lanphan avatar Jul 06 '24 06:07 lanphan

I am able to reproduce this issue after creating a sub account with no assets (tests on kucoin and binance sub accounts) image

rapcmia avatar Jul 08 '24 11:07 rapcmia

Moved github ticket to dashboard repo

rapcmia avatar Jul 17 '24 13:07 rapcmia

Screenshot 2024-08-22 at 14 44 54

Hey, having the same issue but with Hyperliquid, and the thing is, I already have balance on my account, and still encountering it. So effectively, can't use Hyperliquid with Hbot right now

saltypalo avatar Aug 22 '24 12:08 saltypalo

hyperliquid_perpetual is okay. image

nikspz avatar Aug 23 '24 11:08 nikspz

I am also getting the same error in OKX. I have some non-usdt coins in the account. How do we resolve this ?

image

AD-QT avatar Sep 04 '24 02:09 AD-QT

I am also getting the same error in OKX. I have some non-usdt coins in the account. How do we resolve this ?

image

Can't reproduce for both okx and okx_perpetual

image image image

May be you have 0 balance on exchange

image image

nikspz avatar Sep 10 '24 07:09 nikspz

Nicely spotted. I had the same issue a few weeks back in the Dashboard I believe there it was with an empty KuCoin account.

gordonkoehn avatar Jan 28 '25 20:01 gordonkoehn

Dashboard has been updated and this error on my tests does not occur

  • however reproduce another KeyError when adding 0 balance connector https://github.com/hummingbot/dashboard/issues/255#issue-3241875044

rapcmia avatar Jul 18 '25 05:07 rapcmia