iwootten Posted March 21, 2018 Report Share Posted March 21, 2018 Hi there, I'm finding some very odd behaviour with the ftrack-python-api 1.4.0 and ftrack version 3.5.24.4627. When using a simple example based on the docs, I get what seem to be incorrect events being reported. I can create an entity of any type and get it reported as an entity type of task? import ftrack_api import logging logger = logging.getLogger(__file__) def my_callback(event): print "Caught event" for entity in event['data'].get('entities', []): print entity['entityType'] logging.basicConfig(level=logging.INFO) logging.getLogger('ftrack_api').setLevel(level=logging.WARN) logging.getLogger('requests').setLevel(level=logging.WARN) session = ftrack_api.Session() session.event_hub.subscribe('topic=ftrack.*', my_callback) session.event_hub.wait() Link to comment Share on other sites More sharing options...
iwootten Posted March 21, 2018 Author Report Share Posted March 21, 2018 It looks like I'm simply trying to use the incorrect entity attribute here. It would be good if the schema behind the events was fully documented somewhere (currently it looks like you only describe the topic and source attributes) so we know how it should be structured. This would save me having to manually watch events to understand what changes as I add and remove entities in ftrack. Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted March 23, 2018 Report Share Posted March 23, 2018 On 21/03/2018 at 9:33 PM, iwootten said: It looks like I'm simply trying to use the incorrect entity attribute here. It would be good if the schema behind the events was fully documented somewhere (currently it looks like you only describe the topic and source attributes) so we know how it should be structured. This would save me having to manually watch events to understand what changes as I add and remove entities in ftrack. Absolutely, documenting this better is something that we would like to do. And also update it to follow the new schema and property names so that it is more in line with the rest of the API. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.