apache/beam · error · RuntimeValueProviderError
not accessible
Error message
%s not accessible
What it means
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.
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
Example fix
// before opts.label.get() # raises if not provided // after vp = opts.label value = vp.get() if vp.is_accessible() else 'default-label'
Defensive patterns
Strategy: type-guard
Validate before calling
if not all(getattr(holder, name).is_accessible() for name in holder.value_provider_list):
raise RuntimeError('not all value providers are accessible') Type guard
def all_accessible(holder):
return all(getattr(holder, vp).is_accessible() for vp in holder.value_provider_list) Try / catch
try:
result = holder.as_dict()
except RuntimeValueProviderError as ex:
logger.error('missing runtime option: %s', ex)
raise Prevention
- Supply all template parameters at launch time
- Give every option a default where sensible
- Check is_accessible() before decorated calls
When it happens
Trigger: 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.
Common situations: Dataflow templates launched without all template parameters filled; dereferencing pipeline options at build time; missing command-line flags for declared options.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- .get() not called from a runtime context
- A BigQuery table or a query must be specified
- A cluster_identifier should be Optional[Union[str…
- A context manager constructor (not a fully constructed…
- A has been supplied to the model handler, but the required…
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/40cedebbe18f0691.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/options/value_provider.py:191
def check_accessible(value_provider_list):
"""A decorator that checks accessibility of a list of ValueProvider objects.
Args:
value_provider_list: list of ValueProvider objects
Raises:
``RuntimeValueProviderError``: if any of the provided objects are not
accessible.
"""
assert isinstance(value_provider_list, list)
def _check_accessible(fnc):
@wraps(fnc)
def _f(self, *args, **kwargs):
for obj in [getattr(self, vp) for vp in value_provider_list]:
if not obj.is_accessible():
raise error.RuntimeValueProviderError('%s not accessible' % obj)
return fnc(self, *args, **kwargs)
return _f
return _check_accessible
View on GitHub (pinned to 12126d8942)