iflytek/astron-agent · error · CustomException
VARIABLE_POOL_SET_PARAMETER_ERROR
VARIABLE_POOL_SET_PARAMETER_ERROR
Error message
Node {node_id} input parameter {mapping_key} does not exist What it means
Raised by VariablePool.add_init_variable when seeding initial outputs for a node: the assembled mapping key (node_id + key name) is not present in output_variable_mapping, meaning the node's protocol does not declare that output parameter. Thrown as CustomException with code VARIABLE_POOL_SET_PARAMETER_ERROR after logging 'input key ... not exist' to the span.
Solutions
- Compare key_name_list against the node's declared output schema and fix the key names
- Update the node's output definition to include the missing key if it is legitimately needed
- Ensure add_init_variable runs only after output_variable_mapping has been populated from the protocol
- Log/inspect self.output_variable_mapping keys for that node to find the correct name
Example fix
// before pool.add_init_variable(node_id, ["outpu"], result, span) // after keys = [k for k in declared_output_keys(node_id)] pool.add_init_variable(node_id, keys, result, span)
Defensive patterns
Strategy: validation
Validate before calling
declared = {assemble_mapping_key(node_id, k) for k in node_output_keys(node_id)}
missing = [k for k in key_name_list if assemble_mapping_key(node_id, k) not in declared]
assert not missing, f"undeclared output keys: {missing}" Type guard
def key_declared(pool, node_id: str, key: str) -> bool:
return assemble_mapping_key(node_id, key) in pool.output_variable_mapping Try / catch
try:
pool.add_init_variable(node_id, keys, value, span)
except CustomException as e:
if e.err_code == CodeEnum.VARIABLE_POOL_SET_PARAMETER_ERROR:
log.error(f"init keys invalid for {node_id}: {e.err_msg}")
else:
raise Prevention
- Derive init keys from the node's schema, never hardcode them
- Call add_init_variable only after the pool's output mapping is built
- Log output_variable_mapping keys when initializing a new node type
When it happens
Trigger: Calling add_init_variable(node_id, key_name_list, value, ...) with a key name that the node's declared output schema does not contain (mapping key absent from output_variable_mapping).
Common situations: Typo in the output parameter name; node schema changed (output renamed/removed) while init code still passes the old key; passing start/system node inputs whose keys were never registered in the pool.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- VARIABLE_POOL_GET_PARAMETER_ERROR
- get variable error
- VARIABLE_POOL_SET_PARAMETER_ERROR
- key does not exist
- ENG_PROTOCOL_VALIDATE_ERROR
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/f6ac6da440fe9bc9.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/entities/variable_pool.py:503
value: dict,
span: Span,
) -> None:
"""
Initialize variables for a node with validation.
:param node_id: ID of the node to initialize variables for
:param key_name_list: List of variable names to initialize
:param value: Dictionary containing variable values
:param span: Span object for tracing and error reporting
"""
self.do_validate(
node_id=node_id, key_name_list=key_name_list, outputs=value, span=span
)
for key in key_name_list:
mapping_key = assemble_mapping_key(node_id, key)
if mapping_key not in self.output_variable_mapping:
span.add_error_event(f"input key {mapping_key} not exist")
raise CustomException(
err_code=CodeEnum.VARIABLE_POOL_SET_PARAMETER_ERROR,
err_msg=f"Node {node_id} input parameter {mapping_key} does not exist",
)
mapping_value = self.output_variable_mapping[mapping_key]
value_schema = mapping_value.get("schema")
input_value_content = value.get(key)
is_update = False
python_schema_type = schema_type_map_python.get(
value_schema.get("type"), []
)
for schema_type in python_schema_type:
if isinstance(input_value_content, schema_type):
is_update = True
break
if is_update:
mapping_value.update({"value": input_value_content})
def get_output_schema(self, node_id: str, key_name: str) -> Dict[str, Any]:View on GitHub (pinned to 5e758547a8)