MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / get_contents

Method get_contents

dm_control/mjcf/attribute.py:566–571  ·  view source on GitHub ↗

Returns a bytestring representing the contents of the asset.

(self)

Source from the content-addressed store, hash-verified

564 raise ValueError(_INVALID_MESH_EXTENSION.format(extension))
565
566 def get_contents(self):
567 """Returns a bytestring representing the contents of the asset."""
568 if self._value is None:
569 raise RuntimeError('You must assign a value to this attribute before '
570 'querying the contents.')
571 return self._value.contents
572
573 def to_xml_string(self, prefix_root=None, **kwargs):
574 """Returns the asset filename as it will appear in the generated XML."""

Callers 8

get_assetsMethod · 0.80
engine_test.pyFile · 0.80
index_test.pyFile · 0.80
image_utils.pyFile · 0.80
_load_pixelsFunction · 0.80
core_test.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected