{"record":{"id":"3fcd0448beeb2fd6","repo":"FoundationAgents/MetaGPT","slug":"dataset-task-name-not-found-in-config-file-avai-3fcd04","errorCode":null,"errorMessage":"Dataset {task_name} not found in config file. Available datasets: {data_config['datasets'].keys()}","messagePattern":"Dataset (.+?) not found in config file\\. Available datasets: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"metagpt/ext/sela/utils.py","lineNumber":50,"sourceCode":"\n    # _logger.remove()\n    _logger.level(\"MCTS\", color=\"<green>\", no=25)\n    # _logger.add(sys.stderr, level=print_level)\n    _logger.add(Path(DATA_CONFIG[\"work_dir\"]) / DATA_CONFIG[\"role_dir\"] / f\"{log_name}.txt\", level=logfile_level)\n    _logger.propagate = False\n    return _logger\n\n\nmcts_logger = get_mcts_logger()\n\n\ndef get_exp_pool_path(task_name, data_config, pool_name=\"analysis_pool\"):\n    datasets_dir = data_config[\"datasets_dir\"]\n    if task_name in data_config[\"datasets\"]:\n        dataset = data_config[\"datasets\"][task_name]\n        data_path = os.path.join(datasets_dir, dataset[\"dataset\"])\n    else:\n        raise ValueError(\n            f\"Dataset {task_name} not found in config file. Available datasets: {data_config['datasets'].keys()}\"\n        )\n    exp_pool_path = os.path.join(data_path, f\"{pool_name}.json\")\n    if not os.path.exists(exp_pool_path):\n        return None\n    return exp_pool_path\n\n\ndef change_plan(role, plan):\n    print(f\"Change next plan to: {plan}\")\n    tasks = role.planner.plan.tasks\n    finished = True\n    for i, task in enumerate(tasks):\n        if not task.code:\n            finished = False\n            break\n    if not finished:\n        tasks[i].plan = plan","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/FoundationAgents/MetaGPT/blob/11cdf466d042aece04fc6cfd13b28e1a70341b1f/metagpt/ext/sela/utils.py#L32-L68","documentation":"Raised by get_exp_pool_path when task_name is not a key in data_config['datasets']. The helper resolves the path to <datasets_dir>/<dataset>/<pool_name>.json (default analysis_pool.json) and cannot do so for an unregistered task.","triggerScenarios":"Calling get_exp_pool_path with a task that has no entry in the datasets yaml — same class of mismatch as the dataset.py lookups, but hit earlier during MCTS setup when locating the experience pool.","commonSituations":"--task typo; custom dataset not registered in datasets.yaml; config loaded from the wrong working directory.","solutions":["Use a task name present in the 'Available datasets' list printed in the error","Register the dataset in the datasets config before running the search","Confirm datasets_dir points at the directory containing your dataset folders"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if task_name not in data_config[\"datasets\"]:\n    raise KeyError(f\"{task_name} not in datasets config\")","typeGuard":"def is_registered_dataset(task_name: str, data_config: dict) -> bool:\n    return task_name in data_config.get(\"datasets\", {})","tryCatchPattern":null,"preventionTips":["Centralize task-name validation at experiment startup","Ensure datasets_dir and the yaml config agree on dataset names"],"tags":["sela","config","dataset","mcts"],"backgroundTag":null,"analyzedSha":"11cdf466d042aece04fc6cfd13b28e1a70341b1f","analyzedAt":"2026-08-14T23:20:02.994Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}