Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SiteSync: fix dirmap #4436

Merged

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Feb 8, 2023

Brief description

Fixed issue in dirmap in Maya and Nuke

Description

Loads of error were thrown in Nuke console about dictionary value.
AttributeError: 'dict' object has no attribute 'lower'

Additional info

remote_site_dir started to return platform dict instead of str value

Documentation (add "type: documentation" label)

feature_documentation

Testing notes:

  1. enable SiteSync on a project,
  2. set local site to local, remote to Studio
  3. start Nuke or Maya - observe console

remote_site_dir started to return platform dict
@kalisp kalisp added the type: bug Something isn't working label Feb 8, 2023
@kalisp kalisp self-assigned this Feb 8, 2023
@ynbot
Copy link
Contributor

ynbot commented Feb 8, 2023

@kalisp kalisp assigned m-u-r-p-h-y and unassigned kalisp Feb 8, 2023
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with Maya and Nuke. No suspicious error logs spotted

example Nuke startup log:

Nuke 12.2v9, 64 bit, built Sep  3 2021.
Copyright (c) 2021 The Foundry Visionmongers Ltd.  All Rights Reserved.
Licence expires on: 2023/7/11
D:\REPO\OpenPype\openpype\vendor\python\python_2\pkg_resources\py2_warn.py:19: UserWarning: ************************************************************
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release. Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please comment in
https://github.com/pypa/setuptools/issues/1458
about the steps that led to this unsupported combination.
************************************************************
  sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60)
Module `blessed` failed on import or terminal creation. Pype terminal won't use colors.
*** WRN: >>> { GDriveHandler }: [ Import failed, imported from Python 2, operations will fail. ]
*** WRN: >>> { SyncServer-SFTPHandler }: [ Import failed, imported from Python 2, operations will fail. ]
>>> [ menu_name `load` | menu_label `OpenPype` ]
>>> [ Adding Shortcut `ctrl+alt+l` to `load` ]
>>> [ menu_name `create` | menu_label `OpenPype` ]
>>> [ Adding Shortcut `ctrl+alt+c` to `create` ]
>>> [ menu_name `manage` | menu_label `OpenPype` ]
>>> [ Adding Shortcut `ctrl+alt+m` to `manage` ]
>>> [ menu_name `build_workfile` | menu_label `OpenPype` ]
>>> [ Adding Shortcut `ctrl+alt+b` to `build_workfile` ]
>>> [ menu_name `publish` | menu_label `OpenPype` ]
>>> [ Adding Shortcut `ctrl+alt+p` to `publish` ]
  - { openpype.hosts.nuke.api.lib }: [ Skipping studio gizmo `OpenPype Gizmo`, no gizmo path found. ]
>>> [ Added Nuke callbacks ... ]
  - { timers_manager }: [ Installing task changed callback ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
P:\PROJECTS -> D:\PROJECTS
  - { openpype.hosts.nuke.api.lib }: [ C:/Users/murph/AppData/Local/Temp/nuke/localize: P:\PROJECTS->D:\PROJECTS ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ C:/Users/murph/AppData/Local/Temp/nuke/.autosave: P:\PROJECTS->D:\PROJECTS ]
  - { NukeDirmap }: [ active local - remote studio ]
D:\REPO\OpenPype\openpype\vendor\python\python_2\pkg_resources\py2_warn.py:19: UserWarning: ************************************************************
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release. Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please comment in
https://github.com/pypa/setuptools/issues/1458
about the steps that led to this unsupported combination.
************************************************************
  sys.version_info < (3,) and warnings.warn("*" * 60 + msg + "*" * 60)
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ C:/Program Files/Nuke12.2v9/plugins/template.nk: P:\PROJECTS->D:\PROJECTS ]
>>> [ Resetting resolution ]
>>> [ Creating new format: 1920 1080 1.00 OP01_CG_demo ]
>>> [ Format is set. ]
  - { openpype.hosts.nuke.api.lib }: [ __ asset data: `{u'visualParent': ObjectId('629f557b3b15d7e82065b202'), u'resolutionHeight': 1080, u'clipIn': 1, u'frameStart': 1001, u'tasks': {u'animation': {u'type': u'Animation'}, u'lighting': {u'type': u'Lighting'}, u'compositing': {u'type': u'Compositing'}}, u'handleStart': 0, u'entityType': u'Shot', u'frameEnd': 1001, u'parents': [u'shots'], u'tools_env': [u'mtoa/5-2-1-0', u'yeti/4-1-4', u'studioLibrary/2-9-6-b3', u'substance/2-1-9'], u'thumbnail_id': ObjectId('62a74ad34e8c0f040f1ce7a9'), u'pixelAspect': 1.0, u'ftrackId': u'472cbacc-e667-11ec-a62b-52feab992e78', u'resolutionWidth': 1920, u'fps': 25.0, u'handleEnd': 0, u'clipOut': 1, u'avalon_mongo_id': u'629f557b3b15d7e82065b203', u'inputLinks': [], u'description': u''}` ]
  - { openpype.hosts.nuke.api.lib }: [ Creating knobname `publish_instance` on node `Root` ]
>>> [ Setting colorspace to workfile... ]
>>> [ Setting colorspace to viewers... ]
>>> [ Setting colorspace to write nodes... ]
>>> [ Setting colorspace to read nodes... ]
  - { openpype.hosts.nuke.api.lib }: [ {} ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ C:/Users/murph: P:\PROJECTS->D:\PROJECTS ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ /: P:\PROJECTS->D:\PROJECTS ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ D:/: P:\PROJECTS->D:\PROJECTS ]
  - { NukeDirmap }: [ active local - remote studio ]
  - { NukeDirmap }: [ local overrides {u'work': u'D:\\PROJECTS'} ]
  - { NukeDirmap }: [ remote overrides {u'work': u'P:\\PROJECTS'} ]
  - { NukeDirmap }: [ local sync mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
>>> [ Processing directory mapping ... ]
>>> [ mapping:: {'destination-path': [u'D:\\PROJECTS'], 'source-path': [u'P:\\PROJECTS']} ]
  - { openpype.hosts.nuke.api.lib }: [ C:/Program Files/Nuke12.2v9: P:\PROJECTS->D:\PROJECTS ]
Disk cache C:/Users/murph/AppData/Local/Temp/nuke\ViewerCache/??: 15MB (1% of 10240MB) used in 2 files.

@m-u-r-p-h-y m-u-r-p-h-y assigned kalisp and unassigned m-u-r-p-h-y Feb 9, 2023
@kalisp kalisp merged commit 0572627 into develop Feb 9, 2023
@kalisp kalisp deleted the bugfix/OP-4702_Maya-dirmap-issue-if-Site-Sync-is-enabled branch February 9, 2023 09:19
@github-actions github-actions bot added this to the next-patch milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants