{"record":{"id":"a04d4c66fae62288","repo":"microsoft/qlib","slug":"subclass-of-instrumentstorage-must-implement-upda","errorCode":null,"errorMessage":"Subclass of InstrumentStorage must implement `update` method","messagePattern":"Subclass of InstrumentStorage must implement `update` method","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"qlib/data/storage/storage.py","lineNumber":223,"sourceCode":"        \"\"\"\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `data` method\")\n\n    def clear(self) -> None:\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `clear` method\")\n\n    def update(self, *args, **kwargs) -> None:\n        \"\"\"D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.\n\n        Notes\n        ------\n            If E present and has a .keys() method, does:     for k in E: D[k] = E[k]\n\n            If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v\n\n            In either case, this is followed by: for k, v in F.items(): D[k] = v\n\n        \"\"\"\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `update` method\")\n\n    def __setitem__(self, k: InstKT, v: InstVT) -> None:\n        \"\"\"Set self[key] to value.\"\"\"\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `__setitem__` method\")\n\n    def __delitem__(self, k: InstKT) -> None:\n        \"\"\"Delete self[key].\n\n        Raises\n        ------\n        ValueError\n            If the data(storage) does not exist, raise ValueError\n        \"\"\"\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `__delitem__` method\")\n\n    def __getitem__(self, k: InstKT) -> InstVT:\n        \"\"\"x.__getitem__(k) <==> x[k]\"\"\"\n        raise NotImplementedError(\"Subclass of InstrumentStorage must implement `__getitem__` method\")","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/data/storage/storage.py#L205-L241","documentation":"Error \"Subclass of InstrumentStorage must implement `update` method\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/data/storage/storage.py:223 when the guard condition fails: \"Subclass of InstrumentStorage must implement `update` method\". 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":["Implement the `update` method in your InstrumentStorage subclass.","Use the built-in FileInstrumentStorage which implements `update`."],"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-15T17:31:12.345Z"}