{"record":{"id":"40cedebbe18f0691","repo":"apache/beam","slug":"s-not-accessible","errorCode":null,"errorMessage":"%s not accessible","messagePattern":"(.+?) not accessible","errorType":"exception","errorClass":"RuntimeValueProviderError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/options/value_provider.py","lineNumber":191,"sourceCode":"\n\ndef check_accessible(value_provider_list):\n  \"\"\"A decorator that checks accessibility of a list of ValueProvider objects.\n\n  Args:\n    value_provider_list: list of ValueProvider objects\n  Raises:\n    ``RuntimeValueProviderError``: if any of the provided objects are not\n      accessible.\n  \"\"\"\n  assert isinstance(value_provider_list, list)\n\n  def _check_accessible(fnc):\n    @wraps(fnc)\n    def _f(self, *args, **kwargs):\n      for obj in [getattr(self, vp) for vp in value_provider_list]:\n        if not obj.is_accessible():\n          raise error.RuntimeValueProviderError('%s not accessible' % obj)\n      return fnc(self, *args, **kwargs)\n\n    return _f\n\n  return _check_accessible\n","sourceCodeStart":173,"sourceCodeEnd":197,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/options/value_provider.py#L173-L197","documentation":"The @check_accessible decorator guards methods that require all referenced value providers to be readable. If any wrapped value provider is not accessible (its value not yet provided at runtime), it raises RuntimeValueProviderError naming the inaccessible provider.","triggerScenarios":"Calling a decorated method (e.g. AsDict or similar on a value provider holder) while one of the value_provider_list providers has no runtime value; template-based execution where an option was left unset.","commonSituations":"Dataflow templates launched without all template parameters filled; dereferencing pipeline options at build time; missing command-line flags for declared options.","solutions":["Ensure every option's value is provided at runtime (pass all required flags/template parameters)","Check is_accessible() on each value provider before calling the decorated method","Use default values for options so providers are always accessible","Switch to StaticValueProvider where the value is known at graph construction"],"exampleFix":"// before\nopts.label.get()  # raises if not provided\n// after\nvp = opts.label\nvalue = vp.get() if vp.is_accessible() else 'default-label'","handlingStrategy":"type-guard","validationCode":"if not all(getattr(holder, name).is_accessible() for name in holder.value_provider_list):\n    raise RuntimeError('not all value providers are accessible')","typeGuard":"def all_accessible(holder):\n    return all(getattr(holder, vp).is_accessible() for vp in holder.value_provider_list)","tryCatchPattern":"try:\n    result = holder.as_dict()\nexcept RuntimeValueProviderError as ex:\n    logger.error('missing runtime option: %s', ex)\n    raise","preventionTips":["Supply all template parameters at launch time","Give every option a default where sensible","Check is_accessible() before decorated calls"],"tags":["python","apache-beam","value-provider","accessibility"],"backgroundTag":"missing-env-var","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}