Tank folder creation


I’m having an issue with a new project I’ve done advanced project setup for. I’m trying to use the standalone Publisher app from Shotgun Desktop to publish some images for a new asset task I’ve created… After I select the context and try to validate the publish, I get the following error:

creation for %s and try again!" % (self, self.shotgun_url))
TankError: Cannot resolve template data for context ‘concept, Asset door-01’ - this context does not have any associated folders created on disk yet and therefore no template data can be extracted. Please run the folder creation for and try again!

To resolve this, I need to run tank.bat Asset door-01 folders in a terminal. However, this has never happened on any of my previous projects on Shotgun, so I don’t understand why it’s needed for this new project. I would expect Shotgun toolkit to generate the required folders during run time.

Any ideas why this may be happening? Is this behavior configurable somewhere? Any help is much appreciated.


We generally create folders manually after the shots/assets have been added in Shotgun.
Not sure if “advanced setup” would create folders for entities that already exist.
Some dcc apps like Workfiles do create folders and register path cache entities.

Keep in mind also that this is affected by your “folder schema”, which can cause weird issues if it doesn’t completely match the templates.

Indeed this should be happening automatically, ideally.
I think scanning the filesystem has been implicated in some toolkit slowness, so there’s that.

1 Like

Thank you for your input @mmoshev

Personally, I’ve never manually created folders for Shotgun projects before. I guess it might be the case that I’ve always published files through a DCC, rather than using the standalone publisher first thing after setting up a project. Since creating a work file in a DCC already creates the folder structure for the given context, publishing that work file would not cause this issue.

I would really like to figure out how to ensure this with the standalone publisher as well.

1 Like

The Shotgun guys can give a more informed answer (I don’t understand how the path cache works), but the crude way would be to just add folder creation in the publish hook.
This takes an entity type and id.


Yeah, that could work, will try it out, thanks @mmoshev !


Hi @viktor_petrov

Have you modified the standalone Publish app hooks at all or settings?
I just wanted to understand if you hit this with the default behaviour.

However @mmoshev suggestion sounds reasonable if you want to avoid needing to manually create the folders before hand.

The reason it’s probably not happened to you before, is because you’ve started work on the asset in a Software prior to using the standalone publisher, so the folders have already been created/synced. Launching a Software (via Toolkit) will create the folders for the context you launch in, and the open app will create the folders for the context you start a new file in. So usually as you mention you don’t need to specifically create folders.


Thanks for chiming in, @philip.scadding

I’ve sub-classed and modified the standalone publishing hooks, but I also call the original validation and publishing hooks on run time, so this behavior is by default.

Yeah, like I mentioned I also think this happened because this was my first time attempting standalone publishing for a new entity/task without going through a DCC first.

Thank you all for your help clearing this up!