{"record":{"id":"6b7f8587bfe80051","repo":"infiniflow/ragflow","slug":"variableaggregator-group-name-can-not-be-empty","errorCode":null,"errorMessage":"[VariableAggregator] group_name can not be empty!","messagePattern":"\\[VariableAggregator\\] group_name can not be empty!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/component/variable_aggregator.py","lineNumber":39,"sourceCode":"\n\nclass VariableAggregatorParam(ComponentParamBase):\n    \"\"\"\n    Parameters for VariableAggregator\n\n    - groups: list of dicts {\"group_name\": str, \"variables\": [variable selectors]}\n    \"\"\"\n\n    def __init__(self):\n        super().__init__()\n        # each group expects: {\"group_name\": str, \"variables\": List[str]}\n        self.groups = []\n\n    def check(self):\n        self.check_empty(self.groups, \"[VariableAggregator] groups\")\n        for g in self.groups:\n            if not g.get(\"group_name\"):\n                raise ValueError(\"[VariableAggregator] group_name can not be empty!\")\n            if not g.get(\"variables\"):\n                raise ValueError(f\"[VariableAggregator] variables of group `{g.get('group_name')}` can not be empty\")\n            if not isinstance(g.get(\"variables\"), list):\n                raise ValueError(f\"[VariableAggregator] variables of group `{g.get('group_name')}` should be a list of strings\")\n\n    def get_input_form(self) -> dict[str, dict]:\n        return {\n            \"variables\": {\n                \"name\": \"Variables\",\n                \"type\": \"list\",\n            }\n        }\n\n\nclass VariableAggregator(ComponentBase):\n    component_name = \"VariableAggregator\"\n\n    @timeout(int(os.environ.get(\"COMPONENT_EXEC_TIMEOUT\", 3)))","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/agent/component/variable_aggregator.py#L21-L57","documentation":"ValueError from VariableAggregatorParam.check(). The aggregator groups list must contain dicts, and each dict must have a truthy 'group_name'; a group with a missing or empty name is rejected before execution.","triggerScenarios":"A groups entry like {\"variables\": [...]} without group_name, or with group_name set to \"\"/None. check_empty already guaranteed groups itself is non-empty; this fires per-group.","commonSituations":"Adding a group in the canvas UI but not naming it; hand-edited DSL omitting the key; duplicating a group and clearing the name to change it later.","solutions":["Give every aggregation group a non-empty name in the VariableAggregator config.","Delete unnamed placeholder groups.","When authoring DSL programmatically, assert each group dict has a truthy group_name before saving."],"exampleFix":"// before\n\"groups\": [{\"variables\": [\"a@x\", \"b@y\"]}]\n\n// after\n\"groups\": [{\"group_name\": \"inputs\", \"variables\": [\"a@x\", \"b@y\"]}]","handlingStrategy":"validation","validationCode":"for g in aggregator_param.groups:\n    assert g.get('group_name'), f'group missing name: {g}'","typeGuard":"def group_has_name(g: dict) -> bool:\n    return isinstance(g, dict) and bool(g.get('group_name'))","tryCatchPattern":"try:\n    aggregator_param.check()\nexcept ValueError as e:\n    if 'group_name can not be empty' in str(e):\n        # name or remove the offending group\n        ...","preventionTips":["Name every aggregation group at creation time.","Delete placeholder groups instead of leaving them unnamed.","Validate group dicts when generating canvases programmatically."],"tags":["variable-aggregator","configuration","validation","agent-canvas"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}