Representations created without data.context — unloadable in every DCC Loader ("Failed to load items") #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Products published via
ayon_publish_modelappear in the AYON Loader UI (Houdini etc.), but loading fails with "Failed to load items" /InvalidRepresentationContext.Root cause (verified 2026-07-16 by executing the real loader code path headless)
ayon_coreresolves the file path like this (pipeline/load/utils.py::get_representation_path, core 1.9.1):The Loader does NOT use
attrib.pathorfiles[].pathfor resolution. It formatsattrib.templatewith the representation'sdata.contextdict. MCP-created representations havedata = {}→KeyError: 'context'→InvalidRepresentationContext→ "Failed to load items".This was the final blocker in the quercus_oak publish (tie_fighter): after template and file naming were already correct, loading still failed until
data.contextwas patched in.Required fix
create_representationmust write a full context block intodata.context, matching what Pyblish/Integrate produces:Every key referenced by
attrib.templatemust exist in the context (hierarchy,folder[name],product[type],product[name],project[name],project[code],version,ext).rootis overridden by Anatomy at load time.Verification recipe (no DCC needed)
Env:
AYON_SERVER_URL,AYON_API_KEY,AYON_BUNDLE_NAME(production bundle fromGET /api/bundles).Relation to other issues
attrib.template(already documented) anddata.context(this issue) are both mandatory for loadability.