asavinov / intelligent-trading-bot

Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering
https://t.me/intelligent_trading_signals
MIT License
803 stars 179 forks source link

Error when running python -m scripts.generate_features -c config.json #12

Closed towerbuster closed 1 year ago

towerbuster commented 1 year ago

I have the following error :

Loading data from source data file DATA_ITB/BTCUSDT/data.csv...
Finished loading 2591 records with 23 columns.
Start generating features for 2591 input records.
Start generator klines...
Unknown feature generator klines
Traceback (most recent call last):
  File "/home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/gitpod/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/workspace/intelligent-trading-bot/scripts/generate_features.py", line 202, in <module>
    main()
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/workspace/intelligent-trading-bot/scripts/generate_features.py", line 66, in main
    df, new_features = generate_feature_set(df, fs, last_rows=0)
TypeError: cannot unpack non-iterable NoneType object
asavinov commented 1 year ago

Please post your configuration here, at least the "feature_sets" list. It seems that this section is not correctly formatted. A typical format for feature_sets is in the App.config:

"feature_sets": [
    {"column_prefix": "", "generator": "binance_main", "feature_prefix": ""}
]
towerbuster commented 1 year ago

I have resolved the issue by manually creating the directories (DATA_ITB/BTCUSDT etc...). It's ok now but I have to work again on this project that seems very interesting. I'll let you know if I have issues when I work on it again. Thank you.