Jump to content

Removing Components from ftrack.server Using New API


Recommended Posts

I'm attempting to remove a component from the ftrack.server location following the instructions here: http://ftrack-python-api.rtd.ftrack.com/en/stable/locations/tutorial.html

I encounter an error when I attempt to remove a component published to the ftrack.server location as so:

server_location = session.query('Location where name is "ftrack.server"').one()


LocationError: No accessor defined for location <Location("ftrack.server", ...

There doesn't seem to be an accessor for the server location made available, there's a protected one within 'ftrack_api.accessor.server' but using this yields a number of other errors.

How do I configure the location to correctly remove components?

Link to comment
Share on other sites

This looks very odd - could you provide the following information and I will try to reproduce it here:

  • Run this "print server_location.accessor"
  • What version of the ftrack-python-api do you run?
  • A small script to reproduce it, including the session creation, etc. See https://stackoverflow.com/help/mcve - please make sure to remove api keys etc.
Link to comment
Share on other sites

Having attempted this again outside of the script in question, it appears this may well be because the "existing_component" is retrieved through use of query projections. I've been able to successfully remove the component when doing this in isolated script and querying the component directly so I guess I may well need to query the full component details rather than attempting to remove the projection query's result.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...