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

problem on start. #124

Open
modemfish opened this issue Dec 21, 2021 · 7 comments
Open

problem on start. #124

modemfish opened this issue Dec 21, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@modemfish
Copy link

C:\0000\binann>main.py
2021-12-21 10:16:20,636 INFO: Getting the list of supported currencies from gate io
2021-12-21 10:16:23,886 INFO: List of gate io currencies saved to currencies.json. Waiting 5 minutes before refreshing list...
2021-12-21 10:16:23,901 INFO: new-coin-bot online
2021-12-21 10:16:23,901 INFO: working...
2021-12-21 10:16:24,917 INFO: Kucoin announcements enabled, look for new Kucoin coins...
Traceback (most recent call last):
File "C:\0000\binann\main.py", line 468, in
main()
File "C:\0000\binann\main.py", line 427, in main
latest_coin = get_last_coin()
File "C:\0000\binann\new_listings_scraper.py", line 104, in get_last_coin
if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or
IndexError: list index out of range

@modemfish
Copy link
Author

i got round it i think by:

found_coin = re.findall('(([^)]+)', latest_announcement)
uppers = None

**if len(found_coin) <1:
        uppers = None
else:**        
# returns nothing if it's an old coin or it's not an actual coin listing
    if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or \
            found_coin[0] in previously_found_coins:

    # if the latest Binance announcement is not a new coin listing, or the listing has already been returned, check kucoin
        if config['TRADE_OPTIONS']['KUCOIN_ANNOUNCEMENTS'] and 'Gets Listed' in kucoin_announcement\
        and kucoin_coin[0] != globals.latest_listing and kucoin_coin[0] not in previously_found_coins:
            if len(kucoin_coin) == 1:
                uppers = kucoin_coin[0]
                previously_found_coins.add(uppers)
                logger.info('New Kucoin coin detected: ' + uppers)
            if len(kucoin_coin) != 1:
                uppers = None

    else:
        if len(found_coin) == 1:
            uppers = found_coin[0]
            previously_found_coins.add(uppers)
            logger.info('New coin detected: ' + uppers)
        if len(found_coin) != 1:
            uppers = None
    print(f'{uppers=}')

return uppers

@ghostnetrn
Copy link

ghostnetrn commented Dec 21, 2021

2021-12-21 12:58:35,748 INFO: started working...
Traceback (most recent call last):
File "main.py", line 466, in
main()
File "main.py", line 425, in main
latest_coin = get_last_coin()
File "gateio/src/new_listings_scraper.py", line 104, in get_last_coin
if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or
IndexError: list index out of range

@lovehedy24
Copy link

Same problem as ghostnetrn
IndexError: list index out of range

@geelenbert
Copy link

Same problem here

@Leo-AO-99
Copy link

if 'Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or
found_coin[0] in previously_found_coins:
to
if 'Binance Will List' not in latest_announcement or found_coin[0] == globals.latest_listing or
found_coin[0] in previously_found_coins:

@Leo-AO-99
Copy link

'Will List' in binance latest annoucement title('Binance Futures Will List....'),but no index in found_coin,so use the 'Binance Will List' to match the title

@Linus045 Linus045 added the bug Something isn't working label Dec 28, 2021
@FJCon
Copy link

FJCon commented Jun 17, 2022

Hi, I need help to solve this problem:

2022-06-17 15:39:14,346 INFO: Getting the list of supported currencies from gate io
2022-06-17 15:39:17,596 INFO: List of gate io currencies saved to currencies.json. Waiting 5 minutes before refreshing list...
2022-06-17 15:39:17,596 INFO: new-coin-bot online
Traceback (most recent call last):
File "C:\Users\Kaioken04\Desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\main.py", line 5, in
main()
File "c:\users\kaioken04\desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\src\gateio_new_coins_announcements_bot\main.py", line 469, in main
latest_coin = get_last_coin()
File "c:\users\kaioken04\desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master\src\gateio_new_coins_announcements_bot\new_listings_scraper.py", line 130, in get_last_coin
or found_coin[0] == globals.latest_listing
IndexError: list index out of range

C:\Users\Kaioken04\Desktop\gateio-crypto-trading-bot-binance-announcements-new-coins-master>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants