Component path shows up red
0

16 posts in this topic

Hello,

I just attached a file as a component to a version but it shows up red in the browser. I did some googling and found this thread:

forum.ftrack.com/topic/167-location-path-is-red/

But it doesn't solve my problem.

The structure I used can be reproduced using: (Sorry the real code is inside intranet I have no way to bring it out):

class ConfigurationiStructure(StandardStructure):
  def _get_parts(self, component):
    return ['play', 'asset_a', 'v003']

And the way I'm using the structure is,

location.structure = ConfigurationStructure()
version.create_component(
  r'd:\test_upload.jpg',
  {'name': 'ftrackreview-image'},
  location=location
)

Also I noticed that when I click Review button in the component, the review page shows up but with an error "A server error occurred. Please try again or contact support.” and it fails to load any media.

Any help would be appreciated

Share this post


Link to post
Share on other sites

Hi @John Su, the path is resolved through an event available in ftrack_connect itself and called resolve.py
If the path is red is possible that your structure cannot be properly initialised and hence not be resolved.
You can try adding more logs into the resolve.py and see if anything is off.
Please send us , either here or through support (depending on how sensible the information are) and we'll look further into it.
Hope it helps.
Cheers.

L.

Share this post


Link to post
Share on other sites

Thanks Lorenzo, it works after launching ftrack connect(don't know it has to be with connect before).

Is there anyway I can get it work without ftrack-connect? We've wrapped all the publish/actions launcher entrace so except for this we don't need ftrack-connect. It would be great if there's a way we can do it without ftrack-connect. Cheers.

Share this post


Link to post
Share on other sites

Hi @John Su, sure you can ! 
just extract the given script (or download it directly from here ) and drop it in a folder mapped in a  FTRACK_EVENT_PLUGIN_PATH environment variable.
When the session start will look into that variable to see if there's any plugin to be discovered and run.
I'd suggest having one folder on a shared server folder mapped so you can simply drop events in there.

Hope it helps.
If you need any further help just let us know !
L.

Share this post


Link to post
Share on other sites

Hi Lorenzo it's correctly resolved for now but I have 2 questions:

1. It seems that the resolver.py under ftrack-connect installation directory is not found by ftrack web. It works as expected after I put it under $FTRACK_EVENT_PLUGIN_PATH. Is this a normal behaviour?

2. Now It works with the help of ftrack-connect. Without it the local session is fine but I failed to get it found by ftrack web. Any suggestion?

Thank you.

Share this post


Link to post
Share on other sites

Hi @John Su, you don't need to have ftrack connect running to have actions and events.
You can run them as simple python scripts (as long as they can access the ftrack-python-api).

1) no it should jut work 

2) In here you can find many examples on how to run events and actions as standalone.
Hope it helps.
L.

Share this post


Link to post
Share on other sites

@John Su if you want this to be working for everyone, $FTRACK_EVENT_PLUGIN_PATH  should be set on each machine , and should be pointing to a shared folder on the network path.   If on the other hand you just want to test it by yourself you can drop it in the local plugin folders under a hook folder (please note this applies also on the shared one).

If you are still having issues please let us know and we'll try to further help you out.

Cheers.

L.

 

ps.

Best of course is to extend the environment and not to replace it , so something like:

FTRACK_EVENT_PLUGIN_PATH=$FTRACK_EVENT_PLUGIN_PATH:/your/central/path

 

Share this post


Link to post
Share on other sites

Sorry I have to bother you again. Because it still doesn't work, nor did I get the logic.

Could you talk a little bit more detail about how the component path in ftrack web page get resolved by script under $FTRACK_EVENT_PLUGIN_PATH? I think that's the part confused me most. 

ftrack web page is displayed in web browser, the browser might know the environment variable but how does the script get involved?( there's even no python interpreter on the machine that's running the web browser).

Share this post


Link to post
Share on other sites

Hi @John Su, you can find some more information about the plugin ftrack environment paths here
Overall though the env does not have to be known by the server as is up to the session object to discover it and put it to the use.

The resolve scripts uses the ftrack events to notify the server about the resolved path of the component .
ftrack event system is quite powerful and I'd suggest digging deeper looking in here.
You can also find more examples on how to use events in our recipes repository.


Hope it helps.
L.

Share this post


Link to post
Share on other sites

The environment variables can affect the local python created session object. But isn't the session that generate the web page on server end? So locally setting ftrack variables won't affect the web page. Is it right?

Or did I misuse the word "web"? Just to be clear I mean the ftrack web page interface, not through customized python client.

Share this post


Link to post
Share on other sites

The environment variable will tell the session object where to pick up its plugins (the resolve in this case).
The resolve will then submit to the server the information on how to represent the component path through the event I've been linking you previously.
Hope it makes more sense this way.
L.

Share this post


Link to post
Share on other sites

In regards to "The environment variable will tell the session object where to pick up its plugins (the resolve in this case)."  does the specific "session object" live in browser? Because it definitely doesn't start locally in any python intepreter as one can browse ftrack web without python installed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0