{"record":{"id":"96322afd8623b6a8","repo":"microsoft/qlib","slug":"cannot-support-interval-96322a","errorCode":null,"errorMessage":"cannot support {interval}","messagePattern":"cannot support (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/data_collector/pit/collector.py","lineNumber":203,"sourceCode":"        growth_df = pd.DataFrame(growth_list, columns=fields)\n        try:\n            growth_df = growth_df[list(column_mapping.keys())]\n        except KeyError:\n            return pd.DataFrame()\n        growth_df.rename(columns=column_mapping, inplace=True)\n        growth_df[\"field\"] = \"YOYNI\"\n        growth_df[\"value\"] = pd.to_numeric(growth_df[\"value\"], errors=\"ignore\")\n        return growth_df\n\n    def get_data(\n        self,\n        symbol: str,\n        interval: str,\n        start_datetime: pd.Timestamp,\n        end_datetime: pd.Timestamp,\n    ) -> pd.DataFrame:\n        if interval != self.INTERVAL_QUARTERLY:\n            raise ValueError(f\"cannot support {interval}\")\n        symbol, exchange = symbol.split(\".\")\n        exchange = \"sh\" if exchange == \"ss\" else \"sz\"\n        code = f\"{exchange}.{symbol}\"\n        start_date = start_datetime.strftime(\"%Y-%m-%d\")\n        end_date = end_datetime.strftime(\"%Y-%m-%d\")\n\n        performance_express_report_df = self.get_performance_express_report_df(code, start_date, end_date)\n        profit_df = self.get_profit_df(code, start_date, end_date)\n        forecast_report_df = self.get_forecast_report_df(code, start_date, end_date)\n        growth_df = self.get_growth_df(code, start_date, end_date)\n\n        df = pd.concat(\n            [performance_express_report_df, profit_df, forecast_report_df, growth_df],\n            axis=0,\n        )\n        return df\n\n","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/scripts/data_collector/pit/collector.py#L185-L221","documentation":"Raised by the PIT (point-in-time financial report) collector's get_data (scripts/data_collector/pit/collector.py:203) when interval != INTERVAL_QUARTERLY. PIT data (performance express reports, profit, forecast, growth) is only meaningful at quarterly granularity, so any other interval is rejected up-front before the symbol is split into code/exchange and the four report fetches begin.","triggerScenarios":"Invoking the PIT collector's get_data with an interval string other than the class's INTERVAL_QUARTERLY constant, e.g. '1d', 'daily', '1min', or even 'quarter' if the constant is spelled differently.","commonSituations":"Reusing an interval value from the yahoo/fund collectors in the PIT pipeline; case/wording mismatches ('quarterly' vs 'q' vs 'quarter'); config templating that applies one interval to all collectors.","solutions":["Pass exactly the collector's INTERVAL_QUARTERLY constant (check its literal value in the class) when calling get_data / running the PIT collector.","Reference the class constant instead of hard-coding a string, so spelling cannot drift.","If you need other report frequencies, use the appropriate collector — PIT is quarterly-only by design."],"exampleFix":"# before\ncollector.get_data(symbol='600000.SS', interval='quarter', start_datetime=..., end_datetime=...)\n\n# after\nfrom scripts.data_collector.pit.collector import PitCollector  # adjust to actual class\ncollector.get_data(symbol='600000.SS', interval=collector.INTERVAL_QUARTERLY, start_datetime=..., end_datetime=...)","handlingStrategy":"validation","validationCode":"assert interval == collector.INTERVAL_QUARTERLY, f'PIT collector is quarterly-only, got {interval}'","typeGuard":"def is_pit_interval(interval: str, collector_cls) -> bool:\n    return interval == collector_cls.INTERVAL_QUARTERLY","tryCatchPattern":"try:\n    df = collector.get_data(symbol, interval, start_datetime, end_datetime)\nexcept ValueError as e:\n    if 'cannot support' in str(e):\n        raise SystemExit('use INTERVAL_QUARTERLY for PIT collection')\n    raise","preventionTips":["Reference INTERVAL_QUARTERLY constant instead of hard-coded strings.","Keep per-collector interval settings in the config that drives each pipeline."],"tags":["pit","interval","validation","quarterly"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}