Willem Zwarthoed

Members
  • Content count

    7
  • Joined

  • Last visited

  • Days Won

    2

Willem Zwarthoed last won the day on October 17

Willem Zwarthoed had the most liked content!

About Willem Zwarthoed

  • Rank
    Newbie
  1. Multiple instance of Ftrack-Connect

    If there was a way for the event to return the hostname or ip of the browser from which an action is called you could at least verify on which machine the action is called. This doesn't solve the multiple instances on one machine issue, but for users logged in on multiple workstations you could at least filter out your custom hooks so only those available on that machine are discovered.
  2. Component 'duplicate entry'

    Ok, so the issue was with these lines: shot["custom_attributes"] = shot_data["custom_attributes"] shot["metadata"] = shot_data["metadata"] which doesn't work anymore, at least with ftrack 3.5.9 and API version 1.0.4. All credits to Eric Hermelin from ftrack support for figuring it out and providing the solution: for key, value in shot_data["custom_attributes"].items(): shot['custom_attributes'][key] = value for key, value in shot_data["metadata"].items(): shot['metadata'][key] = value Everything is working fine again now. Thanks Eric and Matthias for resolving this quickly!
  3. Component 'duplicate entry'

    Great, thanks Matthias!
  4. Component 'duplicate entry'

    Hi, We've migrated to ftrack 3.5 today and now I'm having a hard time debugging this error: shot_thumbnail = shot.create_thumbnail(shotObj.thumbnail) File "/../ftrack_api/entity/component.py", line 59, in create_thumbnail server_location.add_component(thumbnail_component, [origin_location]) File "/../ftrack_api/entity/location.py", line 78, in add_component [component], sources=source, recursive=recursive File "/../ftrack_api/entity/location.py", line 250, in add_components transferred=transferred LocationError: Failed to register components with location <ServerLocation("ftrack.server", 3a372bde-05bc-11e4-8908-20c9d081909b)> due to error: Server reported error: IntegrityError((_mysql_exceptions.IntegrityError) (1062, "Duplicate entry '7063f1a5-b6d3-44e9-a76f-f8958a974f53' for key 'PRIMARY'") [SQL: u'INSERT INTO context (name, id) VALUES (%s, %s)'] [parameters: (('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'), ('', u'7063f1a5-b6d3-44e9-a76f-f8958a974f53'))]) Transferred component data that may require cleanup: [(<dynamic ftrack FileComponent object 41096912>, 'db635dce-a914-431e- 9eb0-2fc8b1e00a03')] This is now happening on all scripted components I'm creating, but I'm not 100% sure the migration is to blame. Here's an edited sample of what I'm doing: shot_data = {} shot_data["entity"] = { 'name' : shotObj.shot, 'status' : shot_status, 'description' : shotObj.description } shot_data["custom_attributes"] = { 'Colorspace' : [shotObj.out_colorspace], 'Resolution' : [shotObj.out_res], 'fstart' : shotObj.first_frame_no, 'fend' : shotObj.last_frame_no, 'viewlut' : [shotObj.viewlut], 'Extension' : [shotObj.out_file_type], 'Frame Aspect' : [shotObj.frame_aspect], 'FPS' : [shotObj.fps], 'handles' : shotObj.handles } shot_data["metadata"] = {} for key, value in sorted(shotObj.__dict__.iteritems()): if key not in ['widget','task_list']: shot_data["metadata"][key] = str(value) shot = session.create( 'Shot', shot_data["entity"]) shot["custom_attributes"] = shot_data["custom_attributes"] shot["metadata"] = shot_data["metadata"] shot_thumbnail = shot.create_thumbnail(shotObj.thumbnail) I really don't understand what this error is trying to tell me. When I simply select an existing shot and use the create_thumbnail method everything is fine. Any help would be greatly appreciated! Willem
  5. Sorting Custom attributes

    Allright, we'll have to make do then. Thanks!
  6. Sorting Custom attributes

    Thank you Mattias, that works nicely. Is there also a way to sort Attribute groups in the web interface? Willem
  7. Sorting Custom attributes

    Hi, right now, when I create custom attributes I can group them, but not sort them in the web interface. Changes made to custom attributes sometimes cause random sorting changes. Is there a way to sort them properly? Thanks, Willem