{"record":{"id":"3645a551d610178e","repo":"microsoft/qlib","slug":"unknown-pickle-backend-please-use-pickle-or-di","errorCode":null,"errorMessage":"Unknown pickle backend, please use 'pickle' or 'dill'.","messagePattern":"Unknown pickle backend, please use 'pickle' or 'dill'\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"qlib/utils/serial.py","lineNumber":170,"sourceCode":"            return object\n        else:\n            raise TypeError(f\"The instance of {type(object)} is not a valid `{type(cls)}`!\")\n\n    @classmethod\n    def get_backend(cls):\n        \"\"\"\n        Return the real backend of a Serializable class. The pickle_backend value can be \"pickle\" or \"dill\".\n\n        Returns:\n            module: pickle or dill module based on pickle_backend\n        \"\"\"\n        # NOTE: pickle interface like backend; such as dill\n        if cls.pickle_backend == \"pickle\":\n            return pickle\n        elif cls.pickle_backend == \"dill\":\n            return dill\n        else:\n            raise ValueError(\"Unknown pickle backend, please use 'pickle' or 'dill'.\")\n\n    @staticmethod\n    def general_dump(obj, path: Union[Path, str]):\n        \"\"\"\n        A general dumping method for object\n\n        Parameters\n        ----------\n        obj : object\n            the object to be dumped\n        path : Union[Path, str]\n            the target path the data will be dumped\n        \"\"\"\n        path = Path(path)\n        if isinstance(obj, Serializable):\n            obj.to_pickle(path)\n        else:\n            with path.open(\"wb\") as f:","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/utils/serial.py#L152-L188","documentation":"Error \"Unknown pickle backend, please use 'pickle' or 'dill'.\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/utils/serial.py:170 when the guard condition fails: \"Unknown pickle backend\". It triggers when the code path receives input or a state that violates the precondition checked at this point — e.g. an unimplemented abstract method being called, an unsupported argument type/value, or an invalid configuration. To avoid it, satisfy the documented precondition before this call: implement the required method in your subclass, or pass a supported value of the expected type as described by the message.","commonSituations":"See trigger scenarios.","solutions":["Set the pickle backend to 'pickle' or 'dill' in your configuration.","Install dill (`pip install dill`) if you configured the 'dill' backend."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}