{"record":{"id":"07010d1612e9fb4e","repo":"microsoft/qlib","slug":"region-is-not-supported","errorCode":null,"errorMessage":"{region} is not supported","messagePattern":"(.+?) is not supported","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"qlib/utils/time.py","lineNumber":69,"sourceCode":"    if region == REG_CN:\n        for ts in list(\n            pd.date_range(CN_TIME[0], CN_TIME[1] - timedelta(minutes=1), freq=\"1min\") - pd.Timedelta(minutes=shift)\n        ) + list(\n            pd.date_range(CN_TIME[2], CN_TIME[3] - timedelta(minutes=1), freq=\"1min\") - pd.Timedelta(minutes=shift)\n        ):\n            cal.append(ts.time())\n    elif region == REG_TW:\n        for ts in list(\n            pd.date_range(TW_TIME[0], TW_TIME[1] - timedelta(minutes=1), freq=\"1min\") - pd.Timedelta(minutes=shift)\n        ):\n            cal.append(ts.time())\n    elif region == REG_US:\n        for ts in list(\n            pd.date_range(US_TIME[0], US_TIME[1] - timedelta(minutes=1), freq=\"1min\") - pd.Timedelta(minutes=shift)\n        ):\n            cal.append(ts.time())\n    else:\n        raise ValueError(f\"{region} is not supported\")\n    return cal\n\n\ndef is_single_value(start_time, end_time, freq, region: str = REG_CN):\n    \"\"\"Is there only one piece of data for stock market.\n\n    Parameters\n    ----------\n    start_time : Union[pd.Timestamp, str]\n        closed start time for data.\n    end_time : Union[pd.Timestamp, str]\n        closed end time for data.\n    freq :\n    region: str\n        Region, for example, \"cn\", \"us\"\n    Returns\n    -------\n    bool","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/utils/time.py#L51-L87","documentation":"Error \"{region} is not supported\" thrown in microsoft/qlib.","triggerScenarios":"This error is raised at qlib/utils/time.py:69 when the guard condition fails: \"{region} is not supported\". 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":["Use a supported region code (e.g. 'cn', 'us') for market time utilities.","Check the region string for typos and use one of the regions registered in qlib."],"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"}