freqtrade/freqtrade · error · OperationalException

Name is determined by parameter field name and can not be sp

Error message

Name is determined by parameter field name and can not be specified manually.

What it means

Error "Name is determined by parameter field name and can not be specified manually." thrown in freqtrade/freqtrade.

Source

Thrown at freqtrade/strategy/parameters.py:61

        *,
        default: Any,
        space: str | None = None,
        optimize: bool = True,
        load: bool = True,
        **kwargs,
    ):
        """
        Initialize hyperopt-optimizable parameter.
        :param space: The parameter space. Can be 'buy', 'sell', or a string that's also a
                valid python identifier.
                This parameter is optional if parameter name is prefixed with 'buy_' or 'sell_'.
        :param optimize: Include parameter in hyperopt optimizations.
        :param load: Load parameter value from {space}_params.
        :param kwargs: Extra parameters to optuna.distributions.
                (IntDistribution|FloatDistribution|CategoricalDistribution).
        """
        if "name" in kwargs:
            raise OperationalException(
                "Name is determined by parameter field name and can not be specified manually."
            )
        self.space = space
        self._space_params = kwargs
        self.value = default
        self.optimize = optimize
        self.load = load

    def __repr__(self):
        return f"{self.__class__.__name__}({self.value})"

    @property
    def param_type(self) -> str:
        return self.__class__.__name__

    @abstractmethod
    def get_space(self, name: str) -> Union["Integer", "Real", "SKDecimal", "Categorical"]:
        """

View on GitHub (pinned to 1c8edfe4d1)

Solutions

  1. Remove the explicit 'name' argument; the parameter name is taken from the attribute/field name.
  2. Rename the class attribute instead of passing name= to the parameter constructor.

Example fix

Reject a manual name in parameter definitions:
if 'name' in kwargs:
    raise OperationalException('Name is determined by parameter field name and can not be specified manually.')

When it happens

Trigger: Thrown at freqtrade/strategy/parameters.py:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of freqtrade/freqtrade@1c8edfe4d1 (2026-08-15). Data as JSON: /api/errors/67aefe77d630bfb3. Report an issue: GitHub.