boto/boto3 · error · ResourceLoadException
{parent.__class__.__name__} has no load method!
Error message
{parent.__class__.__name__} has no load method! What it means
Raised by get_data_member() in boto3/resources/params.py when a request-parameter or identifier path requires data from a parent resource, meta.data is None, and the parent has no load method. This is the same root cause as error 16 but triggered internally during create_request_parameters — i.e. when building the arguments for a resource action that references a 'data' source and the parent was never hydrated.
Source
Thrown at boto3/resources/params.py:44
Get a data member from a parent using a JMESPath search query,
loading the parent if required. If the parent cannot be loaded
and no data is present then an exception is raised.
:type parent: ServiceResource
:param parent: The resource instance to which contains data we
are interested in.
:type path: string
:param path: The JMESPath expression to query
:raises ResourceLoadException: When no data is present and the
resource cannot be loaded.
:returns: The queried data or ``None``.
"""
# Ensure the parent has its data loaded, if possible.
if parent.meta.data is None:
if hasattr(parent, 'load'):
parent.load()
else:
raise ResourceLoadException(
f'{parent.__class__.__name__} has no load method!'
)
return jmespath.search(path, parent.meta.data)
def create_request_parameters(parent, request_model, params=None, index=None):
"""
Handle request parameters that can be filled in from identifiers,
resource data members or constants.
By passing ``params``, you can invoke this method multiple times and
build up a parameter dict over time, which is particularly useful
for reverse JMESPath expressions that append to lists.
:type parent: ServiceResource
:param parent: The resource instance to which this action is attached.
:type request_model: :py:class:`~boto3.resources.model.Request`View on GitHub (pinned to c7b4afac23)
Solutions
- Hydrate the parent before invoking the action: parent.load() if available, or perform a describing call first.
- Construct the parent from a response that already includes data (e.g. via a list/collection).
- Fall back to the low-level client to supply the needed parameter explicitly.
Example fix
# before
parent = some_resource(id='x')
parent.related_action() # action needs parent.data_field, no load -> error
# after
parent = some_resource(id='x')
if hasattr(parent, 'load'):
parent.load()
parent.related_action() Defensive patterns
Strategy: try-catch
Validate before calling
def ensure_loaded(resource):
if resource.meta.data is None and hasattr(resource, 'load'):
resource.load()
return resource Type guard
def can_load(resource) -> bool:
return hasattr(resource, 'load') or resource.meta.data is not None Try / catch
from boto3.exceptions import ResourceLoadException
try:
parent.related_action()
except ResourceLoadException:
# hydrate or use low-level client
parent.meta.client.some_api_call(...) Prevention
- Hydrate parent resources (load or describe) before triggering actions that reference their data.
- Build parents from collection/list responses so meta.data is already populated.
- Be aware of which resource actions have 'data' source params in the model.
When it happens
Trigger: Calling an action on a resource whose request model references a data member of the parent, when the parent has no load action and no cached data. E.g. invoking a relation/action that needs parent.some_field where parent was built from identifiers only.
Common situations: Chaining resource actions on identifier-only parent resources that lack a load method; service-model definitions where a data member is referenced but the resource cannot self-load.
Related errors
- {self.__class__.__name__} has no load method
- Unknown keyword argument: {name}
- Required parameter {identifier} not set
- Unsupported source type: {source}
- Unsupported source type: {source}
AI-assisted analysis of boto/boto3@c7b4afac23 (2026-08-04).
Data as JSON: /data/errors/7cce716294f7ee5c.json.
Report an issue: GitHub.