Nuke render publish fails due to missing template category

Traceback (most recent call last):
  File "/cache/dev/OpenPype/.venv/lib/python3.9/site-packages/pyblish/plugin.py", line 522, in __explicit_process
    runner(*args)
  File "/cache/dev/OpenPype/openpype/plugins/publish/integrate.py", line 187, in process
    six.reraise(*sys.exc_info())
  File "/usr/local/python3.7/lib/python3.7/site-packages/six.py", line 719, in reraise
    raise value
  File "/cache/dev/OpenPype/openpype/plugins/publish/integrate.py", line 174, in process
    self.register(instance, file_transactions, filtered_repres)
  File "/cache/dev/OpenPype/openpype/plugins/publish/integrate.py", line 270, in register
    instance)
  File "/cache/dev/OpenPype/openpype/plugins/publish/integrate.py", line 596, in prepare_representation
    publish_template_category = anatomy.templates[template_name]
KeyError: 'render'

Is this failing due to ‘Render’ not existing in the Anatomy (this is the default anatomy), like here:

image

That sounds about right.

This is what it looked like pre-AYON in OpenPype:

Where render was:

{
    "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/{subset}/{@version}",
    "file": "{project[code]}_{asset}_{subset}_{@version}<_{output}><.{@frame}>.{ext}",
    "path": "{@folder}/{@file}"
}

It’s good to note that your Others tab is also empty in your screenshot but OpenPype had these defaults:
image

{
    "maya2unreal": {
        "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}",
        "file": "{subset}_{@version}<_{output}><.{@frame}>.{ext}",
        "path": "{@folder}/{@file}"
    },
    "simpleUnrealTextureHero": {
        "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/hero",
        "file": "{originalBasename}.{ext}",
        "path": "{@folder}/{@file}"
    },
    "simpleUnrealTexture": {
        "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/{@version}",
        "file": "{originalBasename}_{@version}.{ext}",
        "path": "{@folder}/{@file}"
    },
    "online": {
        "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/publish/{family}/{subset}/{@version}",
        "file": "{originalBasename}<.{@frame}><_{udim}>.{ext}",
        "path": "{@folder}/{@file}"
    },
    "source": {
        "folder": "{root[work]}/{originalDirname}",
        "file": "{originalBasename}.{ext}",
        "path": "{@folder}/{@file}"
    },
    "transient": {
        "folder": "{root[work]}/{project[name]}/{hierarchy}/{asset}/work/{family}/{subset}"
    }
}

So things like the transient feature recently added and lots of unreal related stuff will likely fail somewhere too if it relied on these being there.

@iLLiCiT @mkolar are these templates intended to be replaced by new ones?

Ah, cool. Thanks for that. And can I add this currently in Ayon?

Ok, messing with the templates (adding a line there) breaks Anatomy('project-name') calls

Thanks for the report we’ll have a look at that soon

Please change settings in core/tools/publish/template_name_profiles. Each template name except publish must have prefix publish_. So renderpublish_render.

EDITED:
The same is for hero templates but there should be prefix hero_.

Ok cool, did that. Would I then add ‘render’ here in a project anatomy?
image

well if I try that I get

Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/cache/dev/OpenPype/openpype/pipeline/anatomy.py", line 439, in __init__
    project_doc = self.get_project_doc_from_cache(project_name)
  File "/cache/dev/OpenPype/openpype/pipeline/anatomy.py", line 448, in get_project_doc_from_cache
    project_cache.update_data(get_project(project_name))
  File "/cache/dev/OpenPype/openpype/client/server/entities.py", line 50, in get_project
    return convert_v4_project_to_v3(
  File "/cache/dev/OpenPype/openpype/client/server/conversion_utils.py", line 205, in convert_v4_project_to_v3
    _fill_template_category(templates, cat_templates, key)
  File "/cache/dev/OpenPype/openpype/client/server/conversion_utils.py", line 141, in _fill_template_category
    default_template_name = _get_default_template_name(cat_templates)
  File "/cache/dev/OpenPype/openpype/client/server/conversion_utils.py", line 128, in _get_default_template_name
    default_template = template["name"]
KeyError: 'name'

or something else?