iwootten Posted January 2, 2018 Report Share Posted January 2, 2018 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() server_location.remove_component(existing_component) session.commit() Quote 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 More sharing options...
Mattias Lagergren Posted January 3, 2018 Report Share Posted January 3, 2018 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 More sharing options...
iwootten Posted January 3, 2018 Author Report Share Posted January 3, 2018 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 More sharing options...
Mattias Lagergren Posted January 5, 2018 Report Share Posted January 5, 2018 Interesting, it would be great to know if you can find how to reproduce this. The query projections, or how the component is retrieved should not affect anything so if that is the case it sounds like you've found a bug. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.