{"record":{"id":"7f1cff044c9c3917","repo":"apache/beam","slug":"value-for-sideinput-s-not-provided","errorCode":null,"errorMessage":"Value for sideinput %s not provided","messagePattern":"Value for sideinput (.+?) not provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/common.py","lineNumber":752,"sourceCode":"    if core.DoFn.ElementParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.KeyParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.WindowParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.WindowedValueParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.TimestampParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.PaneInfoParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif core.DoFn.SideInputParam == d:\n      # If no more args are present then the value must be passed via kwarg\n      try:\n        args_with_placeholders.append(next(remaining_args_iter))\n      except StopIteration:\n        if a not in input_kwargs:\n          raise ValueError(\"Value for sideinput %s not provided\" % a)\n    elif isinstance(d, core.DoFn.StateParam):\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif isinstance(d, core.DoFn.TimerParam):\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif isinstance(d, type) and core.DoFn.BundleFinalizerParam == d:\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif isinstance(d, core.DoFn.BundleContextParam):\n      args_with_placeholders.append(ArgPlaceholder(d))\n    elif isinstance(d, core.DoFn.SetupContextParam):\n      args_with_placeholders.append(ArgPlaceholder(d))\n    else:\n      # If no more args are present then the value must be passed via kwarg\n      try:\n        args_with_placeholders.append(next(remaining_args_iter))\n      except StopIteration:\n        pass\n  args_with_placeholders.extend(list(remaining_args_iter))\n","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/common.py#L734-L770","documentation":"PerWindowInvoker._get_arg_placeholders computes argument placeholders for the process method. When a SideInputParam is next in positional order but positional args are exhausted and the value isn't in input_kwargs, the side input value is genuinely missing, so ValueError names the missing side input.","triggerScenarios":"process(self, el, si=DoFn.SideInputParam) invoked where the runner/harness supplies fewer positional args than parameters and no matching kwarg for the side input — e.g. side_inputs list misordered or a side input omitted from the invoker setup.","commonSituations":"Custom runners/tests invoking DoFns without passing side-input values; mismatch between pcoll | Map(fn, AsSingleton(x)) wiring and the invoker's side_inputs argument.","solutions":["Pass the side input value as a keyword argument matching the parameter name","Ensure create_invoker received the side_inputs list aligned with the DoFn's SideInputParam order","Fix the calling harness to supply all positional args the process method expects"],"exampleFix":"// before\ninvoker.invoke_process(window_value, args=[el])  # si param unfilled\n// after\ninvoker.invoke_process(window_value, args=[el], kwargs={'si': side_input_value})","handlingStrategy":"validation","validationCode":"import inspect\nn_side_inputs = sum(1 for p in inspect.signature(fn.process).values if p.default is DoFn.SideInputParam)\nassert len(positional_args) + n_side_inputs >= expected_param_count, 'side input value missing'","typeGuard":null,"tryCatchPattern":"try:\n    invoker.invoke_process(wv, args=args, kwargs=kwargs)\nexcept ValueError as e:\n    if 'sideinput' in str(e): ...  # repair kwargs and retry once","preventionTips":["Match side_inputs ordering to SideInputParam declaration order","Always pass side input values as kwargs in custom harnesses"],"tags":["python","apache-beam","side-input"],"backgroundTag":"missing-required-argument","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}