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

Uncaught Exception: IndexError: string index out of range - during import of candles #12

Closed
cryptocoinserver opened this issue Apr 28, 2020 · 3 comments

Comments

@cryptocoinserver
Copy link
Collaborator

cryptocoinserver commented Apr 28, 2020

jesse import-candles Bitfinex ETHUSD 2016-01-01

Importing 1579 days candles from "Bitfinex" for "ETHUSD". Maximum time it'll take to finish:"26.33 minutes" (duplicates will be skipped). All good? [Y/n]: Y

No candle exists in the market for 2016-01-01 First present candle is since 2016-01-01. Would you like to continue? [Y/n]: Y

============================== EXCEPTION TRACEBACK:
  File "/usr/local/bin/jesse", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/__init__.py", line 250, in import_candles
    import_candles_mode.run(exchange, symbol, start_date)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/__init__.py", line 109, in run
    run(exchange, symbol, jh.timestamp_to_time(first_existing_timestamp)[:10], True)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/__init__.py", line 109, in run
    run(exchange, symbol, jh.timestamp_to_time(first_existing_timestamp)[:10], True)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/__init__.py", line 109, in run
    run(exchange, symbol, jh.timestamp_to_time(first_existing_timestamp)[:10], True)
  [Previous line repeated 117 more times]
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/__init__.py", line 74, in run
    candles = driver.fetch(symbol, temp_start_timestamp)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/drivers/bitfinex.py", line 76, in fetch
    'volume': d[5]
=========================================================================

 Uncaught Exception: IndexError: string index out of range
@cryptocoinserver
Copy link
Collaborator Author

Also got this error after:
jesse import-candles Bitfinex BTCUSD 2016-01-01
but in this case at 99%

Importing 1579 days candles from "Bitfinex" for "BTCUSD". Maximum time it'll take to finish:"26.33 minutes" (duplicates will be skipped). All good? [Y/n]: Y
Importing candles...  [###################################-]   99%  00:00:00
============================== EXCEPTION TRACEBACK:
  File "/usr/local/bin/jesse", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/__init__.py", line 250, in import_candles
    import_candles_mode.run(exchange, symbol, start_date)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/__init__.py", line 74, in run
    candles = driver.fetch(symbol, temp_start_timestamp)
  File "/home/jesse/.local/lib/python3.8/site-packages/jesse/modes/import_candles_mode/drivers/bitfinex.py", line 76, in fetch
    'volume': d[5]
=========================================================================

 Uncaught Exception: IndexError: string index out of range

@0xVox
Copy link
Contributor

0xVox commented May 8, 2020

I failed to reproduce this.

It's quite possible Bitfinex didn't report volume correctly (or at all) on the final candle - but I can't get the API to do that on my end. In any case - it looks like you probably have all of the data, bar the final 1m candle loaded into your DB and other functionality that relies on this data will still be accurrate.

@cryptocoinserver
Copy link
Collaborator Author

Yeah i started it again and after that it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants