{"record":{"id":"b9525db03c28d554","repo":"microsoft/qlib","slug":"not-found-executor","errorCode":null,"errorMessage":"not found executor","messagePattern":"not found executor","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"qlib/contrib/online/operator.py","lineNumber":193,"sourceCode":"        Parameters\r\n        ----------\r\n        date : str (YYYY-MM-DD)\r\n            Trade date, that the generated order list will be traded.\r\n        path : str\r\n            Path to save user account.\r\n        type : str\r\n            which executor was been used to execute the order list\r\n            'SIM': SimulatorExecutor()\r\n        \"\"\"\r\n        if type not in [\"SIM\", \"YC\"]:\r\n            raise ValueError(\"type is invalid, {}\".format(type))\r\n        um, pred_date, trade_date = self.init(self.client, path, date)\r\n        for user_id, user in um.users.items():\r\n            dates, trade_exchange = prepare(um, trade_date, user_id)\r\n            if type == \"SIM\":\r\n                executor = SimulatorExecutor(trade_exchange=trade_exchange)\r\n            else:\r\n                raise ValueError(\"not found executor\")\r\n            # dates[0] is the last_trading_date\r\n            if str(dates[0].date()) > str(pred_date.date()):\r\n                raise ValueError(\r\n                    \"The account data is not newest! last trading date {}, today {}\".format(\r\n                        dates[0].date(), trade_date.date()\r\n                    )\r\n                )\r\n            # load trade info and update account\r\n            trade_info = executor.load_trade_info_from_executed_file(\r\n                user_path=(pathlib.Path(path) / user_id), trade_date=trade_date\r\n            )\r\n            score_series = load_score_series((pathlib.Path(path) / user_id), trade_date)\r\n            update_account(user.account, trade_info, trade_exchange, trade_date)\r\n\r\n            portfolio_metrics = user.account.portfolio_metrics.generate_portfolio_metrics_dataframe()\r\n            self.logger.info(portfolio_metrics)\r\n            um.save_user_data(user_id)\r\n            self.logger.info(\"Update account state {} for {}\".format(trade_date, user_id))\r","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/microsoft/qlib/blob/79633dd9506ea689e5400dea0197717b5b3d74b7/qlib/contrib/online/operator.py#L175-L211","documentation":"Raised in OnlineOperator.check when type is not 'SIM' (the only branch that constructs an executor). Practically this means type='YC': it passes the earlier type-in-['SIM','YC'] gate but has no executor implementation on this code path, so the else branch raises. It is effectively dead-end functionality rather than a user input typo — the supported value is 'SIM' only.","triggerScenarios":"Calling op.check(..., type='YC') — the second allowed value — which reaches the else branch and raises 'not found executor'.","commonSituations":"Users following the docstring ('SIM': SimulatorExecutor()) and trying the other whitelisted value; leftover half-implemented executor support in this contrib module.","solutions":["Use type='SIM'.","If you need a different executor, implement/patch the branch in operator.py to construct it, or call the executor API directly instead of through check().","Track upstream qlib for a YC executor implementation before relying on that value."],"exampleFix":"# before\nop.check(date=d, path=p, type=\"YC\")  # ValueError: not found executor\n\n# after\nop.check(date=d, path=p, type=\"SIM\")","handlingStrategy":"type-guard","validationCode":"if type != \"SIM\":\n    raise ValueError(\"only the 'SIM' executor is implemented in OnlineOperator.check\")\nop.check(date=d, path=p, type=type)","typeGuard":"def is_implemented_executor(t) -> bool:\n    return t == \"SIM\"","tryCatchPattern":null,"preventionTips":["Treat 'YC' as unsupported until an implementation lands upstream.","Pin the executor choice in one config constant."],"tags":["qlib","online-operator","executor","unsupported-feature"],"backgroundTag":null,"analyzedSha":"79633dd9506ea689e5400dea0197717b5b3d74b7","analyzedAt":"2026-08-15T07:01:27.511Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}