Paidi28

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1

Paidi28 last won the day on June 7 2016

Paidi28 had the most liked content!

About Paidi28

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Paidi28

    Get Thumbnail Url

    Hey guys, in the old API Task had the Task.getThumbnail() function returning a url for the thumbnail. Is there anything equivalent or similar to this in the new API where I can get a url for the thumbnail ?
  2. Paidi28

    Problems on .commit()

    Ah I see where I went wrong now ! That works a charm thanks!
  3. Paidi28

    Problems on .commit()

    def ft_updateOneTask(taskID,newStatusName): session = ftrack_api.Session() currentTask = session.query('Task where id is '+taskID+'').one() print("Previous Status : " + currentTask['status']['name']) currentTask['status'] = newStatusName currentTask = session.query('Task where id is '+taskID+'').one() print currentTask['status'] for operation in session.recorded_operations: print operation session.commit() print("New Status : " + newStatusName) Using a second query after changing the status I can tell that the status has changed locally. Not sure my self why the commit fails, thank you for your help
  4. I am receiving an issue upon committing my session. I am changing the asset's status. Provided is some of the error log. No handlers could be found for logger "ftrack_api.session.Session" Traceback (most recent call last): in line 96, in ft_updateOneTask session.commit() File "C:\Python27\lib\site-packages\ftrack_api\session.py", line 1172, in commit result = self._call(batch) File "C:\Python27\lib\site-packages\ftrack_api\session.py", line 1524, in _call raise ftrack_api.exception.ServerError(error_message) ftrack_api.exception.ServerError: Server reported error: AttributeError('unicode' object has no attribute '_sa_instance_state') Can you help guys ?
  5. It is a text value on a Task object ? Edit* have since made some progress. My problem now appears to be that I cannot set the custom attribute or print their keys ? Thanks for the help! [] Traceback (most recent call last): File "C:\ftrack\NewAPIHandler.py", line 80, in <module> handler.create_new_asset(sg_dict) File "C:\ftrack\NewAPIHandler.py", line 46, in create_new_asset asset['custom_attributes']['Category'] = shotgun_item_dict['sg_sub_type'] File "C:\Python27\lib\site-packages\ftrack_api\collection.py", line 420, in __ setitem__ custom_attribute_value = self._get_entity_by_key(key) File "C:\Python27\lib\site-packages\ftrack_api\collection.py", line 386, in _g et_entity_by_key configuration_id = self.get_configuration_id_from_key(key) File "C:\Python27\lib\site-packages\ftrack_api\collection.py", line 403, in ge t_configuration_id_from_key raise KeyError(key) KeyError: 'Category'
  6. Hey, Björn, Not sure whether I should post a new post so will reply here first. I have created a script using the old API for populating ftrack from some outside data. I managed to get it working but it is quite slow so would like to use the new API. When I try something like this however I get an error TypeError: list indices must be integers, not str task['custom_attributes']['Category'] = item_dict['sub_type'] In the docs you have task['custom_attributes']['my_text_field'] = 'foo' Any idea where I am going wrong ?
  7. Hey there, I want to set up a project using custom attributes on tasks. I want to make them an enumerator type, but can't see if I can edit this later on ? For example I want to have the enum attribute letter. I put a, b and c as the enum types available. Later on in the project it may become necessary to add "d" as a possible enum type as well. Is this possible ? Also is it possible to create an enumerator attribute without it having a corresponding integer value when it doesn't need one ?
  8. Hey I previously used the old API and was wondering should I move to the new one ? Is there anything that I currently can not do in it that I can do in the old one ? Is there any other resources or tutorials for using the API other than the documentation and the "Developing with ftrack" section of the docs ?