Jakub Trllo

  • Content Count

  • Joined

  • Last visited

About Jakub Trllo

  • Rank

Recent Profile Visitors

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

  1. Hi, >> If you want it to return None, you simply have to leave the default value empty, tested now and seems to be working as expected. That's what we are recommending now but our clients mess it up sometimes. >> Setting the default value on the custom attribute indeed override the None if the value is not set, that's what is for. I expect the same `only` if it is not hierarchical attribute - hierarchical attributes should have different properties in API because they have different properties in web app and I don't want to get default value if any of parents value is set. Or better I want to get default value of hierarchical attribute only on project entity if do not have set it because that's top entity. On lower entities doesn't make sence return default value because may return nonsence data (like in example upwards). Exist a way how to get information about custom attribute is set or not on entity? Special query or something? That's all I need at the moment... Thanks, Jakub
  2. Hi, I hope this issue is not caused because we don't have newest ftrack_api version and please let me know if we're handling with old issue. Hierarchical custom attributes makes us unhappy at the moment. Api do not return `None` if default value is set which breaks everything with hierachical attributes for us. Example: Hierarchical Custom attribute `hier_attr` with default value `100` in hierarchy: - project_xy - `hier_attr` is set to `50` / API will return `50` -- hier_1 - `hier_attr` is set to `200` / API will return `200` --- hier_1_1 - `hier_attr` is not set / API will return `100` If value is not set, `None` should be returned (which is acceptable possibility), or `200` in this case and only if all parents don't have set that custom attribute's value then default should be returned like values in web app. Second variant is better for us, but first one also make sence and meets the documentation. Is that possible? Thanks, Jakub Trllo
  3. Hi, Yes but it is strange for me because it is 1 frame more. E.g. mov with 120 frames has `frameIn = 0` and `frameOut = 120` which makes 121 frames (with my logic). But it works, Thanks. Jakub
  4. Hi @Remus Avram, may I ask what was the issue and the solution? We have the same issue. Thanks, Jakub
  5. Hi @Lorenzo Angeli, reset helped out . I'm a little bit afraid that something bad will happen when 100 replies will be added at once... Thanks! Jakub
  6. Hi, I've probably found a `bug` in ftrack_api, When I'm creating multiple notes on entity it works correctly but when a reply on one of those notes is added then on next following note commit session crashes. Example code: task = session.query('Task').first() user = session.query('User').first() # This will work as expected task.create_note('Note 1', user) session.commit() task.create_note('Note 2', user) session.commit() # This will crash note3 = task.create_note('Note 3', user) session.commit() note3.create_reply('Reply 1', user) session.commit() task.create_note('Note 4', user) session.commit() # On this line Reason is missing recipient. I've tried to create it manually but I didn't found out what `resource_id` represents. I need it working ASAP, please help. Thanks!
  7. Found out the mistake I've made because of you. I am using same session for all actions. Seems like not good idea when working with "ftrack.server" location, loose it's definition (probably on session.reset()?). Thanks
  8. I've cut off all unnecessary parts of code and modified it to the most basic script that should work(i think): import ftrack_api session = ftrack_api.Session( auto_connect_event_hub=True, server_url='https://myapp.ftrackapp.com', api_key='xxx-xxx-xxx-xxx-xxx', api_user='my.user.name' ) server_location = session.query( 'Location where name is "ftrack.server"' ).one() # just pretend that note with component will be queried... note = session.query('Note').first() for note_component in note['note_components']: component = note_component['component'] download_url = server_location.get_url(component) # This is line where error is raised path = r'C:\Users\my.user.name\test' + component['file_type'] download_file(download_url, path) def download_file(url, path): r = requests.get(url, stream=True).content with open(path, 'wb') as f: f.write(r)
  9. Hi, I've actually tried API documentation part: ``` server_location = session.query( 'Location where name is "ftrack.server"' ).one() for note_component in note['note_components']: print 'Download URL: {0}'.format( server_location.get_url(note_component['component']) ) ```
  10. Hi, I'm trying out how to download images from notes but when I want call Location.get_url(note_component[component]), session crashes with: AttributeError: 'Symbol' object has no attribute 'get_url'. I've found out that "ftrack.server"'s Location accessor stays set to ftrack_api.symbol.NOT_SET. When I tried same code for "ftrack.unmanaged" it worked correctly. Can you help me what can be wrong on my side? Thanks!