{"record":{"id":"7c87b24f366ced7f","repo":"microsoft/qlib","slug":"invalid-index-range","errorCode":null,"errorMessage":"Invalid index range: {} {}","messagePattern":"Invalid index range: (.+?) (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"qlib/data/base.py","lineNumber":191,"sourceCode":"            cur_pit:\n                it is designed for the point-in-time data.\n            period: int\n                This is used for query specific period.\n                The period is represented with int in Qlib. (e.g. 202001 may represent the first quarter in 2020)\n\n        Returns\n        ----------\n        pd.Series\n            feature series: The index of the series is the calendar index\n        \"\"\"\n        from .cache import H  # pylint: disable=C0415\n\n        # cache\n        cache_key = str(self), instrument, start_index, end_index, *args\n        if cache_key in H[\"f\"]:\n            return H[\"f\"][cache_key]\n        if start_index is not None and end_index is not None and start_index > end_index:\n            raise ValueError(\"Invalid index range: {} {}\".format(start_index, end_index))\n        try:\n            series = self._load_internal(instrument, start_index, end_index, *args)\n        except Exception as e:\n            get_module_logger(\"data\").debug(\n                f\"Loading data error: instrument={instrument}, expression={str(self)}, \"\n                f\"start_index={start_index}, end_index={end_index}, args={args}. \"\n                f\"error info: {str(e)}\"\n            )\n            raise\n        series.name = str(self)\n        H[\"f\"][cache_key] = series\n        return series\n\n    @abc.abstractmethod\n    def _load_internal(self, instrument, start_index, end_index, *args) -> pd.Series:\n        raise NotImplementedError(\"This function must be implemented in your newly defined feature\")\n\n    @abc.abstractmethod","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/data/base.py#L173-L209","documentation":"Error \"Invalid index range: {} {}\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/data/base.py:191 when the guard condition fails: \"Invalid index range: {} {}\". 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":["Pass a valid index range (start, end) within the bounds of the data.","Check that the start index is not greater than the end index and both are within range."],"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"}