Error when resolving path from template at New File open, missing fields

Hi there,

I’ve set up a new project on our SG site and a new configuration for SGTK. When I try to create a new file through the File Open dialog (in tk-multi-workfiles2), I get the following error:

TankError: Tried to resolve a path from the template <Sgtk TemplatePath asset_work_area_maya: assets/{sg_asset_type}/{Asset}/work/{Step}/{username}/maya> and a set of input fields '{'username': 'robert-greene', 'Step': 'MDL', 'Asset': 'chr_RobTest'}' but the following required fields were missing from the input: ['sg_asset_type'] //

I can’t see what in my configuration could be the cause of this. Anywhere I can start searching?



Is the asset linked to an asset type?


Yes all of the assets are assigned an asset type in Shotgun, if that’s what you mean.

1 Like

It maybe possible that the schema has changed since the folders were registered, or that maybe the asset type value has changed? Can you try unregistering the folders for that Asset and see if that works then?

Failing that feel free to pop a support ticket in and we can dig deeper, and then report back here with the solution.

1 Like

Hi Philip,

I’ve tried unregistering folders using:

tank Asset chr_RobTest unregister_folders

And also:

tank unregister_folders --all

But I still run into the same issue. I’ve raised a ticket with support, so I’ll report back with what the problem is.


I just took a look at your site, and can see that a bunch of folders were unregistered and that there appears to have been duplicates in the past from different asset types. Though the FilesystemLocation entities look clean now.
Can you try running the folder creation manually on that one Asset and seeing if that helps?

1 Like

Weirdly, when I run that:

tank Asset chr_RobTest folders

I get the following:

So it seems to make a folder for every asset type for that asset. So that seems wrong to me! Any idea what could be causing that?


Ahah! Yes I can spot the issue. Looking at the config you provided you are missing a filter in the asset.yml, your missing:

So it is creating the Asset folder for all asset types rather than just the one it belongs to.


That was it! Thanks so much Philip. Because the error wasn’t pointing towards anything very specific, I was finding this one hard to track down! Much appreciated!


Yeah I can understand, the error is not clear about where the problem is. The code just knows it wasn’t able to extract the value from the path correctly. So if that happens it generally points to a path cache/schema/templates issue.
Glad it’s sorted!

1 Like