This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
Bug: Ayon Launcher with Site Sync fails to open the latest workfile when opening a task with blender #6148
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior:
With site sync enabled, when launching a task with blender Ayon opens the latest local workfile even if the studio might have a newer publish workfile and if there are no local workfile for that task, blender will open a blank scene instead.
Expected Behavior:
With Site Sync enabled, when launching a task with blender I expect Ayon to copy the latest published workfile from the studio if a copy of that file doesn't already exist locally and to then open that latest published local workfile in blender.
Version
3.18.4
What platform you are running OpenPype on?
Windows
Steps To Reproduce:
- Create a new task
- Publish a new workfile for that task on remote MachineA
- Launch that task with blender 3.6 on remote MachineB
- MachineB creates a new scene instead of opening MachineA's published workfile
- Publish a new workfile for that task on remote MachineB
- Launch that task from remote MachineA
- MachineA will open its own last workfile not MachineB's latest published one
Are there any labels you wish to add?
- I have added the relevant labels to the bug report.
Relevant log output:
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\python_module_tools.py", line 92, in modules_from_path
module = import_filepath(full_path, mod_name)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\python_module_tools.py", line 38, in import_filepath
module_loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\sitesync_1.0.3\ayon_sitesync\launch_hooks\pre_copy_last_published_workfile.py", line 11, in <module>
from openpype.modules.sync_server.sync_server import (
File "C:\Program Files\Ynput\AYON 1.0.0\vendor\python\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'openpype.modules.sync_server'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "logging\__init__.py", line 1086, in emit
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "__startup__.py", line 120, in run
File "console.py", line 16, in run
File "start.py", line 859, in <module>
File "start.py", line 855, in main
File "start.py", line 740, in main_cli
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\cli.py", line 58, in main
ctx.invoke(tray)
File "C:\Program Files\Ynput\AYON 1.0.0\dependencies\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\cli.py", line 78, in tray
PypeCommands().launch_tray()
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\pype_commands.py", line 22, in launch_tray
tray.main()
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\tools\tray\pype_tray.py", line 884, in main
sys.exit(app.exec_())
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\tools\ayon_launcher\ui\actions_widget.py", line 451, in _on_clicked
self._controller.trigger_action(
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\tools\ayon_launcher\control.py", line 131, in trigger_action
self._actions_model.trigger_action(
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\tools\ayon_launcher\models\actions.py", line 367, in trigger_action
action.process(session)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\tools\ayon_launcher\models\actions.py", line 126, in process
self.application.launch(
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 380, in launch
return self.manager.launch(self.full_name, *args, **kwargs)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 560, in launch
return self.launch_with_context(context)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 536, in launch_with_context
return launch_context.launch()
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 1328, in launch
self.run_prelaunch_hooks()
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 1305, in run_prelaunch_hooks
self.discover_launch_hooks()
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\applications.py", line 1170, in discover_launch_hooks
modules, _crashed = modules_from_path(path)
File "C:\Users\MyUserDir\AppData\Local\Ynput\AYON\addons\openpype_3.18.4\openpype\lib\python_module_tools.py", line 97, in modules_from_path
log.warning(
File "logging\__init__.py", line 1458, in warning
File "logging\__init__.py", line 1589, in _log
File "logging\__init__.py", line 1599, in handle
File "logging\__init__.py", line 1661, in callHandlers
File "logging\__init__.py", line 952, in handle
File "logging\__init__.py", line 1091, in emit
Message: 'Failed to load path: "C:\\Users\\MyUserDir\\AppData\\Local\\Ynput\\AYON\\addons\\sitesync_1.0.3\\ayon_sitesync\\launch_hooks\\pre_copy_last_published_workfile.py"'
Arguments: ()
>>> [ Last workfile does not exist. ]
>>> [ Custom templates are not filled. Skipping template copy. ]
>>> [ Registered custom templates didn't match current context. ]
>>> [ Current context does not have any workfile yet. ]
>>> [ Launching "blender/3-6" with args (2): ['C:\\Program Files\\Blender Foundation\\Blender 3.6\\blender.exe', '--python-use-system-env'] ]
Additional context:
- using sitesync 1.0.3 from the addon market
[cuID:OP-7983]