Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

⚡️ mgm-hurry install_mgm - Prompt to update & overwrite mgm-config #168

Open
tonisives opened this issue Oct 20, 2021 · 2 comments · Fixed by #165
Open

⚡️ mgm-hurry install_mgm - Prompt to update & overwrite mgm-config #168

tonisives opened this issue Oct 20, 2021 · 2 comments · Fixed by #165
Labels
Feature - Enhancement Update or improvement to existing feature Planned Planned feature, improvement or bugfix (not being worked on yet)
Milestone

Comments

@tonisives
Copy link

I try to download candle data but it crashes

sh-5.0# ./mgm-hurry download_candle_data --timerange 20210918-20211018
                                     _
 _ __ ___    __ _  _ __ ___         | |__   _   _  _ __  _ __  _   _
| '_ ` _ \  / _` || '_ ` _ \  _____ | '_ \ | | | || '__|| '__|| | | |
| | | | | || (_| || | | | | ||_____|| | | || |_| || |   | |   | |_| |
|_| |_| |_| \__, ||_| |_| |_|       |_| |_| \__,_||_|   |_|    \__, |
            |___/                                              |___/

INFO - 💨 💨 💨
       👉 Download candle data
       💨 💨 💨
? Please enter the timerange you want to use:  20210918-20211018
? Specify which tickers to download:  ['5m', '30m']
? Download extra data for "mgm-config"'s defined "startup_candle_count" & "timerange"? Yes
Traceback (most recent call last):
  File "./mgm-hurry", line 1150, in <module>
    fire.Fire(MGMHurry)
  File "/usr/local/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/usr/local/lib/python3.8/site-packages/fire/core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/usr/local/lib/python3.8/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "./mgm-hurry", line 564, in download_candle_data
    new_timerange_dict = self.monigomani_cli.calculate_timerange_start_minus_startup_candle_count(timerange)
  File "/app/freqtrade-mgm/monigomani/user_data/mgm_tools/mgm_hurry/MoniGoManiCli.py", line 357, in calculate_timerange_start_minus_startup_candle_count
    mgm_config_files['mgm-config']['monigomani_settings']['timeframes']['timeframe'])
KeyError: 'timeframes'

If I set
? Download extra data for "mgm-config"'s defined "startup_candle_count" & "timerange"? Yes
to No, then it doesnt crash.

Versions

INFO - MoniGoMani Version:
commit 0b412dd74170a73a1b2d9c30c1dfb2ef12a8ed45
Author: Rikj000 <rik_helsen@hotmail.com>
Date:   Mon Oct 18 10:10:22 2021 +0000

    ⬆️ Bump `pandas` from 1.3.3 to 1.3.4

INFO - Freqtrade Version:
commit 3503fdb4ec31be99f433fdce039543e0911964d6
Author: Matthias <xmatthias@outlook.com>
Date:   Sat Jul 3 08:38:55 2021 +0200

    Improve tests for newly added methods

I see the issue is that I don't have the timeframes key. I ran mgm-hurry setup and it didn't add this key to my config.json file.

When I set the timeframes dict manually in the config, it works. I didn't try to reinstall mgm to see if this sets the timeframes key.

@Rikj000
Copy link
Owner

Rikj000 commented Oct 20, 2021

Ah I see you managed to fix the issue on your own already 🙂
You indeed still needed to add the new timeframes dict to your mgm-config.

This file doesn't auto update to not overwrite user changes done to the configuration file,
the downside of this however is that users manually have to update it and aren't made aware that new settings have been added.

So I propose an update to mgm-hurry install_mgm, where it will ask you in a prompt if it should overwrite your mgm-config with the latest mgm-config.example.json

@Rikj000 Rikj000 added the Feature - Enhancement Update or improvement to existing feature label Oct 20, 2021
@Rikj000 Rikj000 linked a pull request Oct 20, 2021 that will close this issue
@Rikj000 Rikj000 changed the title mgm-hurry download_candle_data error ⚡️ mgm-hurry install_mgm - Prompt to update & overwrite mgm-config Oct 20, 2021
@tonisives
Copy link
Author

So I propose an update to mgm-hurry install_mgm, where it will ask you in a prompt if it should overwrite your mgm-config with the latest mgm-config.example.json

That sounds like a good idea 👍🏽

@Rikj000 Rikj000 added the Planned Planned feature, improvement or bugfix (not being worked on yet) label Oct 21, 2021
@Rikj000 Rikj000 added this to the v1.0.0 milestone Jan 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature - Enhancement Update or improvement to existing feature Planned Planned feature, improvement or bugfix (not being worked on yet)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants