Eric Hermelin

Members
  • Content Count

    46
  • Joined

  • Last visited

  • Days Won

    7

Eric Hermelin last won the day on February 27 2018

Eric Hermelin had the most liked content!

About Eric Hermelin

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male

Recent Profile Visitors

533 profile views
  1. Not that I can think of, I suppose you could use projections and filter out a few entries like below to make it a bit quicker. search_key = '2_Client_Meeting' for custom_attribute_config in session.query( 'select config from CustomAttributeConfiguration where config like "%\\"data\\"%"' ): try: data = json.loads( json.loads(custom_attribute_config.get('config'))['data'] ) for entry in [entry for entry in data if entry['value'] == search_key]: logging.info( u'found: {0} for key in {1}'.format( entry['menu'], custom_attribute_config['key'] ) ) except ValueError: raise cheers Eric
  2. Hi, Your second example looks right, I wounder if you could have had something else in your session when you committed? Could you try the code below, the only difference here is that we make sure the status is valid for the tasks project. session = ftrack_api.Session( auto_connect_event_hub=False ) task = session.query( 'select project.project_schema from Task' ).first() valid_statuses = task['project']['project_schema'].get_statuses( 'Task' ) task['status'] = valid_statuses[0] session.commit() cheers Eric
  3. Hi Tim, you can reach the custom attribute configuration like this project = session.query( 'select custom_attributes.configuration.label from Project' ).first() for custom_attribute in project.get('custom_attributes').collection: logging.info( custom_attribute.get('configuration').get('label') ) cheers Eric
  4. Hi, could you open a support case ( mail support@ftrack.com ) and attach the log files listed below after having run an other failed export job. /tmp/ftrack.log /tmp/ftrack_reg_worker_*.log /tmp/ftrack_cluster_worker_*.log cheers Eric
  5. Hi, you could order by the version attribute ie. asset_version = session.query( 'select version from AssetVersion where task_id is "{0}" order by version desc'.format( 'ecac0828-4d0a-11e7-953e-0a580aa00899' ) ).first() cheers Eric
  6. Hi Pramod, We resolved an other issue in regards maya 2018 and windows in version 0.7.5 ( turned out to be issues with the QtWebWidgets library ), the client we debugged that issue with have since reported that it is working for them with both 2018.1 and 2018.2 of Maya. Could you open a support case as it would be great if we could gather some additional information about your environment. Sorry for the inconvenience but it is tricky to debug a issue we are unable to recreate in our own environment. cheers Eric
  7. Hi Kat, We have identified one issue that was fixed in version 0.7.4 of connect. Since that release everything is working as expected within our test environments with maya 2018.1 running on windows 10, we do however have one customer, that we are aware of, running windows 7 that is still experiencing issues ( although it appears to be something other original issue but with a similar result ). We are continuing trying to debug the issue but it is a slow process as we are not able to replicate the issue locally. Could you tell us more about your environment, version of connect, exact version of maya and windows version. cheers Eric
  8. Hi Alex, the below example should replicate the drag and drop behavior: import ftrack_api import ftrack_api.symbol session = ftrack_api.Session() file_path = '/home/erhe/Downloads/colour_wheel.mov' asset_name, _ = os.path.splitext( os.path.basename(file_path) ) asset_type = session.query( 'AssetType where name is "Upload"' ).one() shot = session.get( 'Shot', '28032993-d3e7-44c8-83c5-fe42e080d86a' ) asset = session.create('Asset', { 'name': asset_name, 'type': asset_type, 'parent': shot }) asset_version = session.create('AssetVersion', { 'asset':asset, 'task': shot }) component = asset_version.create_component( path=file_path, data={ 'name': asset_name }, location=session.get('Location', ftrack_api.symbol.SERVER_LOCATION_ID) ) asset_version.encode_media( component ) session.commit() result : I am unsure why your first example where you set the metadata manually fails to play in the web player, could you tell me what version of the python api you are running? cheers Eric
  9. Hi Ozen, hope you are well! It is possible to using a advanced query filter to filter on linked entities, below are a few examples, it is however a bit fiddly to update these query filters if you wish to iterate over a few different shots / asset builds, so it might be worth writing a tool using the api to export the information in bulk Using a Shot Query filter, show only shots that have a incoming link to a asset builds named "Monkey" incoming_links.from.name = 'Monkey' Using a Asset Build Query filter, display all asset builds used for a specific shot outgoing_links.to.name = 'SHOT_NAME' cheers Eric
  10. Hi, you can get the asset types for a project / project schema like this session = ftrack_api.Session() project = session.query( 'Project where name is "<ProjectName>"' ).first() types = project.get('project_schema').get_types('AssetBuild') cheers Eric
  11. Hi Tim, I am not too familiar with python on windows, I would however start with making sure your PATH environment variable does not contain references to your standalone python interpreter, you could "sanitize" the environment in the base application launcher for nuke in the ftrack_connect_nuke_hook updating the _getApplicationEnvironment method. cheers Eric
  12. Hi Tim, could you send me the content of the PYTHONPATH, PYTHONHOME and PATH environment variables from inside of nuke or if your ok with it the full content of your environment. import os import pprint pprint.pprint( os.environ ) cheers Eric
  13. Hi Tim, it looks strange that it would pickup your external hashlib, I believe it should be picking up the version shipped with Nuke. Could you try running the below inside of a "clean" Nuke and one launched within your configured environment import random import hashlib print random.__file__ print hashlib.__file__ print random._hashlib.__file__ cheers Eric
  14. Hey Toke, currently our bug tracker is not publicly available, I have however made a note on the ticket to update this thread once addressed. cheers Eric
  15. Thanks for the additional information, I am able to reproduce the issue on Project entities. I will create a bug ticket for this. cheers Eric