{"record":{"id":"6fa31551d6aad8e9","repo":"reflex-dev/reflex","slug":"definition-python-name-is-missing-required-pro","errorCode":null,"errorMessage":"`{definition.python_name}` is missing required prop `{param.name}`.","messagePattern":"`(.+?)` is missing required prop `(.+?)`\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/reflex-base/src/reflex_base/components/memo.py","lineNumber":1570,"sourceCode":"        )\n        raise TypeError(msg)\n\n    # Bind declared props before collecting any rest props.\n    explicit_params = [\n        param\n        for param in definition.params\n        if param.kind not in (MemoParamKind.REST, MemoParamKind.CHILDREN)\n    ]\n    explicit_values = {}\n    remaining_props = kwargs.copy()\n    for param in explicit_params:\n        if param.name in remaining_props:\n            explicit_values[param.name] = remaining_props.pop(param.name)\n        elif param.default is not inspect.Parameter.empty:\n            explicit_values[param.name] = param.default\n        else:\n            msg = f\"`{definition.python_name}` is missing required prop `{param.name}`.\"\n            raise TypeError(msg)\n\n    # Reject unknown props unless a rest prop is declared.\n    if remaining_props and rest_param is None:\n        unexpected_prop = next(iter(remaining_props))\n        msg = (\n            f\"`{definition.python_name}` does not accept prop `{unexpected_prop}`. \"\n            \"Only declared props may be passed when no `rx.RestProp` is present.\"\n        )\n        raise TypeError(msg)\n\n    # Return ordered explicit args when no packed props object is needed.\n    if children_param is None and rest_param is None:\n        return tuple(explicit_values[param.name] for param in explicit_params)\n\n    # Build the props object passed to the imported FunctionVar.\n    children_value: Any | None = None\n    if children_param is not None:\n        from reflex_components_core.base.fragment import Fragment","sourceCodeStart":1552,"sourceCodeEnd":1588,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-base/src/reflex_base/components/memo.py#L1552-L1588","documentation":"A memoized function component invoked via `.call()` (or `functools.partial`) at runtime is missing a prop that has no default value. Reflex inspects the function's signature and requires every parameter without a default to be supplied.","triggerScenarios":"Calling `my_memo.call()` without a keyword argument for a parameter declared without a default (e.g. `def item(x: int)` called as `item.call()`), or misspelling the prop name so the required one never gets bound.","commonSituations":"Typos in prop names (e.g. `colr=` vs `color=`), refactoring a memo signature to add a required parameter while old call sites are not updated, or conditionally building the props dict and forgetting a branch.","solutions":["Add the missing keyword argument shown in the message to the `.call()` invocation","Give the parameter a default value in the memo function definition if the prop is optional","Check for typos in prop names at the call site"],"exampleFix":"// before\n@rx.memo\ndef badge(label: str, tone: str) -> rx.Component: ...\nbadge.call(label=\"hi\")\n\n// after\nbadge.call(label=\"hi\", tone=\"info\")","handlingStrategy":"validation","validationCode":"import inspect\n\ndef check_memo_call(fn, **props):\n    sig = inspect.signature(fn)\n    for name, p in sig.parameters.items():\n        if p.default is inspect.Parameter.empty and name not in props:\n            raise ValueError(f\"missing required prop {name!r}\")\n    return props\n\nbadge.call(**check_memo_call(badge, label=\"hi\"))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep prop names in sync with the memo signature; rely on IDE/type checkers","Prefer giving optional params defaults so only truly required props raise","Write a tiny unit test per memo asserting required props are passed at each call site"],"tags":["reflex","memo","props","required-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}