Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dexbot-cli configure - IndexError: #605

Closed
froooze opened this issue May 26, 2019 · 6 comments
Closed

dexbot-cli configure - IndexError: #605

froooze opened this issue May 26, 2019 · 6 comments
Assignees
Labels
[3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours

Comments

@froooze
Copy link

froooze commented May 26, 2019

Expected Behavior

No error

Actual Behavior

$ dexbot-cli configure
2019-05-25 00:54:56,451 WARNING [SSL: UNEXPECTED_MESSAGE] unexpected message (_ssl.c:847)
Current Uptick Wallet Passphrase: 
Unit dexbot.service could not be found.
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/dexbot-cli", line 11, in <module>
    load_entry_point('dexbot', 'console_scripts', 'dexbot-cli')()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 764, in call
    return self.main(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/dexbot/dexbot/ui.py", line 148, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/dexbot/dexbot/ui.py", line 101, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/dexbot/dexbot/ui.py", line 138, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/dexbot/dexbot/cli.py", line 153, in configure
    configure_dexbot(config, ctx)
  File "/home/ubuntu/dexbot/dexbot/cli_conf.py", line 292, in configure_dexbot
    config['workers'] = {txt: configure_worker(whiptail, {}, bitshares_instance)}
  File "/home/ubuntu/dexbot/dexbot/cli_conf.py", line 267, in configure_worker
    process_config_element(elem, whiptail, worker_config)
  File "/home/ubuntu/dexbot/dexbot/cli_conf.py", line 128, in process_config_element
    worker_config.get(element.key, element.default), element.extra))
  File "/home/ubuntu/dexbot/dexbot/whiptail.py", line 91, in radiolist
    return self.showlist('radiolist', msg, items, prefix)[0]
IndexError: list index out of range

Steps to Reproduce the Problem

  1. dexbot-cli configure
  2. relative orders
  3. external feeds

Specifications

  • Version: 0.10.12
  • OS: Ubuntu 18.04
@bitphage
Copy link
Collaborator

@froooze if this bug is 100% reproducible on your side, can you please provide your config.yml file (account names can be removed)?

@froooze
Copy link
Author

froooze commented May 27, 2019

I can reproduce the error.

node:
- wss://eu.openledger.info/ws
- wss://bitshares.openledger.info/ws
- wss://dexnode.net/ws
- wss://japan.bitshares.apasia.tech/ws
- wss://bitshares-api.wancloud.io/ws
- wss://openledger.hk/ws
- wss://bitshares.apasia.tech/ws
- wss://bitshares.crypto.fans/ws
- wss://kc-us-dex.xeldal.com/ws
- wss://api.bts.blckchnd.com
- wss://btsza.co.za:8091/ws
- wss://bitshares.dacplay.org/ws
- wss://bit.btsabc.org/ws
- wss://bts.ai.la/ws
- wss://ws.gdex.top
- wss://na.openledger.info/ws
- wss://node.btscharts.com/ws
- wss://status200.bitshares.apasia.tech/ws
- wss://new-york.bitshares.apasia.tech/ws
- wss://dallas.bitshares.apasia.tech/ws
- wss://chicago.bitshares.apasia.tech/ws
- wss://atlanta.bitshares.apasia.tech/ws
- wss://us-la.bitshares.apasia.tech/ws
- wss://seattle.bitshares.apasia.tech/ws
- wss://miami.bitshares.apasia.tech/ws
- wss://valley.bitshares.apasia.tech/ws
- wss://canada6.daostreet.com
- wss://bitshares.nu/ws
- wss://api.open-asset.tech/ws
- wss://france.bitshares.apasia.tech/ws
- wss://england.bitshares.apasia.tech/ws
- wss://netherlands.bitshares.apasia.tech/ws
- wss://australia.bitshares.apasia.tech/ws
- wss://dex.rnglab.org
- wss://la.dexnode.net/ws
- wss://api-ru.bts.blckchnd.com
- wss://node.market.rudex.org
- wss://api.bitsharesdex.com
- wss://api.fr.bitsharesdex.com
- wss://blockzms.xyz/ws
- wss://eu.nodes.bitshares.ws
- wss://us.nodes.bitshares.ws
- wss://sg.nodes.bitshares.ws
- wss://ws.winex.pro
- wss://api.bts.mobi/ws
- wss://api.btsxchng.com
- wss://api.bts.network/
- wss://btsws.roelandp.nl/ws
- wss://api.bitshares.bhuz.info/ws
- wss://bts-api.lafona.net/ws
- wss://kimziv.com/ws
- wss://api.btsgo.net/ws
- wss://bts.proxyhosts.info/wss
- wss://bts.open.icowallet.net/ws
- wss://de.bts.dcn.cx/ws
- wss://fi.bts.dcn.cx/ws
- wss://crazybit.online
- wss://freedom.bts123.cc:15138/
- wss://bitshares.bts123.cc:15138/
- wss://api.bts.ai
- wss://ws.hellobts.com
- wss://bitshares.cyberit.io
- wss://bts-seoul.clockwork.gr
- wss://bts.liuye.tech:4443/ws
- wss://btsfullnode.bangzi.info/ws
- wss://api.dex.trading/
- wss://citadel.li/node
workers: {}

@bitphage
Copy link
Collaborator

This is a default config. Ok, I got the point, to reproduce we need to go thru configuration to external feeds option

> /home/dexbot/source/dexbot/whiptail.py(93)radiolist()
-> return self.showlist('radiolist', msg, items, prefix)[0]
(Pdb) args
self = <dexbot.whiptail.Whiptail object at 0x7fd9579f5358>
msg = 'External price source - The bot will try to get price information from this source'
items = [('gecko', 'Coingecko', 'OFF'), ('waves', 'Waves DEX', 'OFF'), ('kraken', 'Kraken', 'OFF'), ('bitfinex', 'Bitfinex', 'OFF'), ('gdax', 'Gdax', 'OFF'), ('binance', 'Binance', 'OFF')]
prefix = ' - '

The problem there is no enabled default.

@bitphage bitphage added [3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours and removed [0] Awaiting User Feedback labels May 28, 2019
@froooze
Copy link
Author

froooze commented May 29, 2019

The problem there is no enabled default.

The UI interface gives me no options to select one or more.

@bitphage
Copy link
Collaborator

@froooze how is that? Can you attach a screenshot?

@froooze
Copy link
Author

froooze commented May 30, 2019

I managed now to select a price source with space key.
Dexbot should also support arrow keys to select things.

With one default value, this problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours
Projects
None yet
Development

No branches or pull requests

2 participants