CoinAlpha / hummingbot

Hummingbot is open source software that helps you build trading bots that run on any exchange or blockchain
https://www.hummingbot.org
Apache License 2.0
168 stars 81 forks source link

Failed Test PR #330 - Error after running balance command #331

Closed rxlxrxsx closed 1 year ago

rxlxrxsx commented 1 year ago

Summary and Screenshots

Getting this error after running balance command when Injective Perpetual is already connected.

Screen Shot 2023-03-30 at 10 02 50 AM
2023-03-30 09:11:13,018 - 4756 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: Can't instantiate abstract class InjectivePerpetualAPIDataSource with abstract methods _get_exchange_base_quote_tokens_from_market_info, _get_exchange_trading_pair_from_market_info, _get_last_trade_price_from_ticker_data, _get_maker_taker_exchange_fee_rates_from_market_info, _get_trading_pair_from_market_info, _parse_trading_rule, connector_name, current_block_time, events_are_streamed
Traceback (most recent call last):
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/client/command/balance_command.py", line 84, in show_balances
    all_ex_bals = await asyncio.wait_for(
  File "/Users/reiniersalazar/opt/anaconda3/envs/hummingbot/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
    return fut.result()
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/user/user_balances.py", line 140, in all_balances_all_exchanges
    await self.update_exchanges(client_config_map)
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/user/user_balances.py", line 136, in update_exchanges
    results = await safe_gather(*tasks)
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/core/utils/async_utils.py", line 22, in safe_gather
    return await asyncio.gather(*args, **kwargs)
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/user/user_balances.py", line 110, in update_exchange_balance
    return await self.add_exchange(exchange_name, client_config_map, **api_keys)
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/user/user_balances.py", line 86, in add_exchange
    market = UserBalances.connect_market(exchange, client_config_map, **api_details)
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/user/user_balances.py", line 25, in connect_market
    init_params = conn_setting.conn_init_parameters(
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/client/settings.py", line 270, in conn_init_parameters
    params["api_data_source"] = self._load_clob_api_data_source(
  File "/Users/reiniersalazar/hbot-ca-injperp/hummingbot/client/settings.py", line 345, in _load_clob_api_data_source
    instance = api_data_source_class(
TypeError: Can't instantiate abstract class InjectivePerpetualAPIDataSource with abstract methods _get_exchange_base_quote_tokens_from_market_info, _get_exchange_trading_pair_from_market_info, _get_last_trade_price_from_ticker_data, _get_maker_taker_exchange_fee_rates_from_market_info, _get_trading_pair_from_market_info, _parse_trading_rule, connector_name, current_block_time, events_are_streamed

Steps To Reproduce

  1. Run gateway (PR 7 - feat/injective_perpetual)
  2. Run the client
  3. Connect Injective Perpetual API key
  4. Run balance command

Test Result Comparison

N/A, new connector

Attachments

N/A

petioptrv commented 1 year ago

This issue should be now addressed

mrhzysbl commented 1 year ago

Ran the latest commit 219225a and ran the balance command. Here's an error that I am getting even after restarting the client:

Screen Shot 2023-04-04 at 4 59 44 PM
2023-04-04 16:50:32,963 - 50275 - root - INFO - chain session cookie loaded from disk:grpc-cookie=33ecbf3b6727874274271d067ef29c5e; Expires=Thu, 06-Apr-23 08:36:16 GMT; Max-Age=172800; Path=/; Secure; HttpOnly
2023-04-04 16:51:02,970 - 50275 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 
Traceback (most recent call last):
  File "/Users/admin/pr330-client/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/Users/admin/pr330-client/hummingbot/client/command/balance_command.py", line 84, in show_balances
    all_ex_bals = await asyncio.wait_for(
  File "/opt/anaconda3/envs/hummingbot/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

@rxlxrxsx kindly try on your end if the same issue occurs.

rxlxrxsx commented 1 year ago

Tested on commit dfa1aee and this is now confirmed fixed. @mrhzysbl that error is most likely related to your connection again, please try running on cloud as well.

Screen Shot 2023-04-04 at 3 09 56 PM