{"record":{"id":"b25fcdfd6d2a694e","repo":"infiniflow/ragflow","slug":"does-not-support-empty-value","errorCode":null,"errorMessage":" does not support empty value.","messagePattern":" does not support empty value\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/component/base.py","lineNumber":261,"sourceCode":"                    if self.func[op_type](value, validation_dict[op_type]):\n                        value_legal = True\n                        break\n\n                if not value_legal:\n                    raise ValueError(\"Please check runtime conf, {} = {} does not match user-parameter restriction\".format(variable, value))\n\n            elif variable in validation_json:\n                self._validate_param(attr, validation_json)\n\n    @staticmethod\n    def check_string(param, description):\n        if type(param).__name__ not in [\"str\"]:\n            raise ValueError(description + \" {} not supported, should be string type\".format(param))\n\n    @staticmethod\n    def check_empty(param, description):\n        if not param:\n            raise ValueError(description + \" does not support empty value.\")\n\n    @staticmethod\n    def check_nonnegative_integer(param, description):\n        if type(param).__name__ not in [\"int\", \"long\"] or param < 0:\n            raise ValueError(description + \" {} not supported, should be 0 or positive integer\".format(param))\n\n    @staticmethod\n    def check_positive_integer(param, description):\n        if type(param).__name__ not in [\"int\", \"long\"] or param <= 0:\n            raise ValueError(description + \" {} not supported, should be positive integer\".format(param))\n\n    @staticmethod\n    def check_positive_number(param, description):\n        if type(param).__name__ not in [\"float\", \"int\", \"long\"] or param <= 0:\n            raise ValueError(description + \" {} not supported, should be positive numeric\".format(param))\n\n    @staticmethod\n    def check_nonnegative_number(param, description):","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/agent/component/base.py#L243-L279","documentation":"check_empty raises when a required string param is falsy ('' , None, empty collection). Used in component check() flows to enforce that fields like model ids, prompts, or dataset ids are present before a run.","triggerScenarios":"A component check() invoking check_empty(param, description) with an empty string or None — e.g. a Generation node with an empty prompt, a Retrieval node with no dataset selected.","commonSituations":"Creating a component in the canvas and forgetting to fill a required field; clearing a dropdown in the UI without picking a replacement; templates shipped with placeholder fields the user never filled; programmatic DSL generation omitting keys.","solutions":["Fill the field named in the description with a non-empty value in the component's params.","Add UI-level required-field enforcement so the canvas cannot be run with empty required inputs.","When generating DSLs programmatically, assert required fields are non-empty before save/run.","If the field is genuinely optional for your use, remove the check_empty call for it rather than defaulting to junk values."],"exampleFix":"# before\nparams = {\"prompt\": \"\"}\n\n# after\nparams = {\"prompt\": \"Summarize the following:\"}","handlingStrategy":"validation","validationCode":"def require_non_empty(conf, required_fields):\n    missing = [f for f in required_fields if not conf.get(f)]\n    if missing:\n        raise ValueError(f'required fields empty/missing: {missing}')","typeGuard":"def is_filled(v) -> bool:\n    return v is not None and v != ''","tryCatchPattern":"try:\n    param.check()\nexcept ValueError as e:\n    if 'does not support empty value' in str(e):\n        field = parse_field(str(e))\n        raise ValueError(f'fill in required field: {field}') from e\n    raise","preventionTips":["Mark required fields in the UI and block run/save while empty.","Assert non-empty required params in DSL generation scripts.","Differentiate optional fields by removing their check_empty call, not by dummy values."],"tags":["canvas","required-field","parameter-validation","empty-value"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}