Hi Ricardo – I tried this out and got some unexpected behavior.
In my test, I had the following line for the standalone Publisher:
collector: "/Users/sassoot/temp/collector.py"
Which gave me the following error:
2020-01-06 22:03:39,569 [67208 ERROR sgtk.env.project.tk-desktop] App
configuration Error for tk-multi-publish2 (configured in environment
'/sgtk/software/shotgun/goats/config/env/project.yml'). It will not be
loaded: Invalid configuration setting 'collector' for tk-multi-publish2: The
specified hook file '/Users/sassoot/temp/collector.py.py' does not exist.
It’s trying to add .py to the end of whatever’s specified. So, I tried
collector: "/Users/sassoot/temp/collector"
and that worked.
So, that’s a semi-decent workaround, but:
Does that actually work for you?
While we have a bunch of different formats for specifying hooks, using an absolute path is not a documented one. If we do support it, we should document it. And I don’t see why we wouldn’t support it, though I’d have to go back to the team to learn more about the why – there may be some history there.
All the other formats allow a full file path. To me it feels like a bug that this balks in this way – it’s rather unintuitive that you can’t just paste in the full path and expect it to work.
Also Ricardo, just a quick heads-up that I changed the subject of your post to reflect that the notation we’re talking about here is around hooks, not arbitrary python files in the environment config files.
Oh, great! Lots of good gems in our documentation, sometimes a little harder to find than you’d hope. I’m working on a guide to taking over hooks; I’ll be sure this is all laid out there.
If environment variable is a good solution for you, I won’t go to the team with this one just yet. If you do end up wanting to go the absolute path route, I’ll dig deeper into it.