Jump to content

thechiclayano

Members
  • Posts

    2
  • Joined

  • Last visited

thechiclayano's Achievements

  1. Hi Patrick. Thank you, this cleared things up. The first example also started working for me know. It's possible I had an entity from a previously closed session in there. Thanks for your help!
  2. Hi everyone, I'm a new user. I'm working in version 2.3.3 of the ftrack python api. So i've been able to create tasks with the following code (this similarly applies for all entity types i've tried): shot = session.query('Shot where name is create_test_shot').one() task = session.create('Task', {'name':'create_test_task'}) shot['children'].append(task) session.commit() This works. However, a lot of other things I would expect to work don't. Here's a few examples: shot = session.query('Shot where name is create_test_shot').one() task = session.create('Task', {'name':'create_test_task'}) task['parent'] = shot #This one is straight from the tutorial session.commit() shot = session.query('Shot where name is create_test_shot').one() task = session.create('Task', {'name':'create_test_task', 'parent':shot}) session.commit() shot = session.query('Shot where name is create_test_shot').one() task = session.create('Task', {'name':'create_test_task', 'parent_id':shot['id']}) session.commit() shot = session.query('Shot where name is create_test_shot').one() task = session.create('Task', {'name':'create_test_task'}) shot['children'].append(task) task['type'] = 'animation' session.commit() All of these fail with the same error when I attempt to commit (using the same data and a fresh session in each case): Server reported error: ValueError(Cannot set relationship to string value.) Nonetype: None Any ideas on what i'm doing wrong?
×
×
  • Create New...