π BugFix - `mgm-hurry hyperopt --spaces` is not correctly accepting multiple spaces on some OSes
Rikj000 opened this issue Β· comments
Currently on some OSes when running for example mgm-hurry hyperopt --spaces 'buy sell roi'
(Multiple spaces),
then MGM-Hurry won't parse the spaces correctly anymore & will result in a crash as following:
Suggested permanent fix
See comment from @SybrandDoev below: Link
Temporary workarounds
- Don't use
--spaces
! Simply define the spaces you wish to use in.hurry
for now if you suffer from this bug π - Switch from
bash
tofish
It appears that bash is eating quotes on some OSes π€
See: Fire Docs - Argument Parsing
All of following alternative writing ways have been tested & confirmed working on my end:
mgm-hurry hyperopt --spaces 'buy sell roi'
mgm-hurry hyperopt --spaces "buy sell roi"
mgm-hurry hyperopt --spaces buy\ sell\ roi
mgm-hurry hyperopt "--spaces buy sell roi"
mgm-hurry hyperopt --spaces '"buy sell roi"'
mgm-hurry hyperopt --spaces "'buy sell roi'"
However on the users side that reported these issues, none of these alternative writing ways helped out
This error is caused by the newly added shell alias. The installer.sh adds this alias via:
Replace /path/to/installation/Freqtrade-MGM/
echo "mgm-hurry() { pushd /path/to/installation/Freqtrade-MGM/ &> /dev/null; python3 -m pipenv run python3 ./mgm-hurry "\$@"; popd &> /dev/null; }" >> ~/.bashrc
As you can see, the echo uses two sets of double quotes "" ""
. That doesn't work.
It should be either:
"mgm-hurry .... '\$@' ... }"
Or the other way around: ' "" '
I changed my alias (with the correct path ofc.) manually to:
mgm-hurry() { pushd /path/to/installation/Freqtrade-MGM/ &> /dev/null; python3 -m pipenv run python3 ./mgm-hurry "$@"; popd &> /dev/null; }
And the problem was gone. no more timeframe sell.
Discord Reference: Link
Should be fixed with commit: ce7c127
Please let me know if it's fixed by doing a clean install with new shell aliases!
But before you test make sure to remove the previous mgm-hurry
alias from ~/.bashrc
(You can edit it with nano
or whatever you prefer, the mgm-hurry
alias should be at the very end)
And also remove the ~/.config/fish/functions/mgm-hurry.fish
file if it exits
Confirmed as fixed by the MGM community! π
Please manually remove the old shell aliases as described above,
then do a clean install and let it create you some new, bug-free shell aliases! π₯³