意外未破坏Python3.8.2

2024-04-19 10:34:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我确实在Python 3.8.2中遇到了一个“意外的未登录”错误。对于代码行:

    @staticmethod
def export_csv_file(config: dict, results: list, total_epochs: int, highlight_best: bool, csv_file: str) -> None:
    """
    Log result to csv-file
    """
    if not results:
        return

我对编码比较陌生,无法解决这个问题。有人能帮我解决这个问题并纠正错误吗

完整输出:

Traceback (most recent call last):
  File "/home/maurits/freqtrade/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/home/maurits/freqtrade/freqtrade/commands/optimize_commands.py", line 61, in start_hyperopt
    from freqtrade.optimize.hyperopt import Hyperopt
  File "/home/maurits/freqtrade/freqtrade/optimize/hyperopt.py", line 389
    def export_csv_file(config: dict, results: list, total_epochs: int, highlight_best: bool, csv_file: str) -> None:
                                                                                                                    ^
IndentationError: unexpected unindent

Tags: csvpyconfighomedeflineexportresults