Remove encode/decode for hyperopt

This commit is contained in:
Matthias
2021-05-01 17:01:52 +02:00
parent cf03daa0fd
commit 30da307d13
3 changed files with 2 additions and 9 deletions

View File

@@ -1,11 +1,6 @@
""" Freqtrade bot """
__version__ = 'develop'
import locale
def getpreferredencoding(do_setlocale=True):
return "utf-8"
locale.getpreferredencoding = getpreferredencoding
if __version__ == 'develop':
try:

View File

@@ -4,7 +4,6 @@
This module contains the hyperopt logic
"""
import locale
import logging
import random
import warnings
@@ -354,7 +353,7 @@ class Hyperopt:
f"Total profit {results_metrics['total_profit']: 11.8f} {stake_cur} "
f"({results_metrics['profit']: 7.2f}\N{GREEK CAPITAL LETTER SIGMA}%). "
f"Avg duration {results_metrics['duration']:5.1f} min."
).encode(locale.getpreferredencoding(), 'replace').decode('utf-8')
)
def get_optimizer(self, dimensions: List[Dimension], cpu_count) -> Optimizer:
return Optimizer(