{"record":{"id":"67aefe77d630bfb3","repo":"freqtrade/freqtrade","slug":"name-is-determined-by-parameter-field-name-and-can","errorCode":null,"errorMessage":"Name is determined by parameter field name and can not be specified manually.","messagePattern":"Name is determined by parameter field name and can not be specified manually\\.","errorType":"exception","errorClass":"OperationalException","httpStatus":null,"severity":"error","filePath":"freqtrade/strategy/parameters.py","lineNumber":61,"sourceCode":"        *,\n        default: Any,\n        space: str | None = None,\n        optimize: bool = True,\n        load: bool = True,\n        **kwargs,\n    ):\n        \"\"\"\n        Initialize hyperopt-optimizable parameter.\n        :param space: The parameter space. Can be 'buy', 'sell', or a string that's also a\n                valid python identifier.\n                This parameter is optional if parameter name is prefixed with 'buy_' or 'sell_'.\n        :param optimize: Include parameter in hyperopt optimizations.\n        :param load: Load parameter value from {space}_params.\n        :param kwargs: Extra parameters to optuna.distributions.\n                (IntDistribution|FloatDistribution|CategoricalDistribution).\n        \"\"\"\n        if \"name\" in kwargs:\n            raise OperationalException(\n                \"Name is determined by parameter field name and can not be specified manually.\"\n            )\n        self.space = space\n        self._space_params = kwargs\n        self.value = default\n        self.optimize = optimize\n        self.load = load\n\n    def __repr__(self):\n        return f\"{self.__class__.__name__}({self.value})\"\n\n    @property\n    def param_type(self) -> str:\n        return self.__class__.__name__\n\n    @abstractmethod\n    def get_space(self, name: str) -> Union[\"Integer\", \"Real\", \"SKDecimal\", \"Categorical\"]:\n        \"\"\"","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/freqtrade/freqtrade/blob/1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15/freqtrade/strategy/parameters.py#L43-L79","documentation":"Error \"Name is determined by parameter field name and can not be specified manually.\" thrown in freqtrade/freqtrade.","triggerScenarios":"Thrown at freqtrade/strategy/parameters.py:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the explicit 'name' argument; the parameter name is taken from the attribute/field name.","Rename the class attribute instead of passing name= to the parameter constructor."],"exampleFix":"Reject a manual name in parameter definitions:\nif 'name' in kwargs:\n    raise OperationalException('Name is determined by parameter field name and can not be specified manually.')","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c8edfe4d1e8d11bd4b40e8fc3237c26c3a60e15","analyzedAt":"2026-08-15T05:09:08.096Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}