On this page
UnresolvedInputError๏
Use md.UnresolvedInputError from the public package namespace.
- class UnresolvedInputError(*, spell_id: str, spell_name: str, message: str, node_id: str | None = None, param_name: str | None = None, inner: BaseException | None = None, expected_type: str, unresolved_params: Tuple[str, ...])[source]๏
- Purpose:
Signal that a meld had to construct an object whose typed constructor parameter has no registered provider, and the meld did not supply the value. Names the consumer, the parameter, the expected type and how to supply it, instead of a bare Python missing-argument error.
- Raised When:
Constructing an object whose Phase-3 topology carries an UNRESOLVED_INPUT socket (a single typed dependency no registered spell provides), and the constructing call's overrides did not supply that parameter. It fires only when that object is actually built: a stored (reused) object never demands its unresolved inputs, and conjure succeeds regardless. It is decided before construction: the many_only and generalized plans raise it before building anything under that object, and a solo root's call target raises it instead of calling the constructor (2026-09-26).
- What To Do About It:
Supply the value in the meld's override payload: the parameter name when melding the consumer itself, a path key ending in >param (or a broadcast **param) when the consumer is built as a dependency. Or bind a provider for the expected type; the consumer re-resolves into a normal dependency on its next meld.
Contract:
A MeldExecutionError: code that catches MeldExecutionError keeps catching it. node_id is the consumer's spell id and param_name the first missing parameter.
expected_type is the parameter annotation's display name, read from the constructor signature on the failure path (Optional and forward references unwrapped); the lowercased frame key is used only if that is unreadable.
unresolved_params lists every missing unresolved parameter of the consumer, in signature order.
inner is None: nothing has been called when it is raised.
Owned State:
Inherited spell_id, spell_name, node_id, param_name, inner.
expected_type: display name of the first missing parameter's type.
unresolved_params: names of all missing unresolved parameters.
- Registration:
A public exception type; import, raise, and catch freely. Like every Melder class it is refused as a spell registration.
- Subsystem Context:
One of the utilities/custom_exceptions/ types; the specific form of MeldExecutionError for the unresolved-input socket contract.
- System Context:
Fires in the resolution layer at meld, after conjure produced the Conduit, before construction: from a plan (many_only, generalized) or from a solo root's call target. Successful melds never evaluate it.
AGENT_ACCESS: public
- AGENT_PURPOSE:
access: public. Raised at meld when an object whose typed parameter has no registered provider is built without that value; supply it by override (root key, >param path key or **param) or bind a provider for expected_type.
- static expected_type_name(annotation: Any) str[source]๏
Render a parameter annotation as the expected-type display name.
- Purpose:
One naming rule for the Phase-4 UNRESOLVED_INPUT warning and this error, so both name the type identically.
Contract:
Unwraps Optional[T] / Union[T, None] to T, and a forward reference to its written name, mirroring Phase-3 matching.
A class renders as its __qualname__; any other annotation object as its repr.
A string renders as itself, minus one layer of matching quotes: a quoted annotation in a module using postponed evaluation arrives as the source text 'Name'.
Pure: no lookups, no side effects.
- Parameters:
annotation -- The parameter's annotation: Phase-1 requirements at conjure, the constructor signature at meld.
- Returns:
Display name of the expected type.
- Return type:
str
- classmethod for_unsupplied(spell: Spell, param_names: Collection[str]) UnresolvedInputError[source]๏
Build the error for unresolved inputs a plan knows are unsupplied, before any construction.
- Purpose:
The decision before construction (design v2 S4, B6): a many_only or generalized plan, or a solo root's call target, raises this instead of calling a constructor that must fail.
Contract:
Selects the consumer's UNRESOLVED_INPUT sockets named in param_names from its live Phase-3 topology and builds the message and fields in signature order; inner is None (nothing was called).
- Parameters:
spell -- The consumer about to be built.
param_names -- Its UNRESOLVED_INPUT parameters that the call does not supply.
- Raises:
RuntimeError -- When the topology has none of those sockets: the plan is stale (a plan is rebuilt whenever the topology re-resolves).
- Returns:
The error to raise.
- Return type: