ynput / OpenPype

Main OpenPype repository and AYON openpype addon codebase
https://openpype.io
MIT License
280 stars 128 forks source link

Core: Headless publish failing without GL lib #6205

Closed fabiaserra closed 3 months ago

fabiaserra commented 5 months ago

Changelog Description

Trying to run a headless publish in the farm I hit another blocker:

2024-02-07 20:42:45:  0: STDOUT: !!! AYON crashed:
2024-02-07 20:42:45:  0: STDOUT: Traceback (most recent call last):
2024-02-07 20:42:45:  0: STDOUT:   File "start.py", line 740, in main_cli
2024-02-07 20:42:45:  0: STDOUT:     ))
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/click/core.py", line 1157, in __call__
2024-02-07 20:42:45:  0: STDOUT:     return self.main(*args, **kwargs)
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/click/core.py", line 1078, in main
2024-02-07 20:42:45:  0: STDOUT:     rv = self.invoke(ctx)
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/click/core.py", line 1688, in invoke
2024-02-07 20:42:45:  0: STDOUT:     return _process_result(sub_ctx.command.invoke(sub_ctx))
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/click/core.py", line 1434, in invoke
2024-02-07 20:42:45:  0: STDOUT:     return ctx.invoke(self.callback, **ctx.params)
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/click/core.py", line 783, in invoke
2024-02-07 20:42:45:  0: STDOUT:     return __callback(*args, **kwargs)
2024-02-07 20:42:45:  0: STDOUT:   File "/pipe/dev/farrizabalaga/OpenPype/openpype/cli.py", line 197, in publish
2024-02-07 20:42:45:  0: STDOUT:     PypeCommands.publish(list(paths), targets, gui)
2024-02-07 20:42:45:  0: STDOUT:   File "/pipe/dev/farrizabalaga/OpenPype/openpype/pype_commands.py", line 100, in publish
2024-02-07 20:42:45:  0: STDOUT:     from openpype.tools.utils.host_tools import show_publish
2024-02-07 20:42:45:  0: STDOUT:   File "/pipe/dev/farrizabalaga/OpenPype/openpype/tools/utils/__init__.py", line 1, in <module>
2024-02-07 20:42:45:  0: STDOUT:     from .layouts import FlowLayout
2024-02-07 20:42:45:  0: STDOUT:   File "/pipe/dev/farrizabalaga/OpenPype/openpype/tools/utils/layouts.py", line 1, in <module>
2024-02-07 20:42:45:  0: STDOUT:     from qtpy import QtWidgets, QtCore
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/dependencies/qtpy/QtWidgets.py", line 111, in <module>
2024-02-07 20:42:45:  0: STDOUT:     from PySide2.QtWidgets import *
2024-02-07 20:42:45:  0: STDOUT:   File "/usr/ayon-launcher/1.0.0+ax/vendor/python/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
2024-02-07 20:42:45:  0: STDOUT:     return original_import(name, *args, **kwargs)
2024-02-07 20:42:45:  0: STDOUT: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

The imports of openpype.tools.utils.host_tools.__init__.py were throwing an error due to trying to import QtWidgets unnecessarily.

Testing notes:

  1. Run a headless publish in a farm worker that doesn't have libGL
mkolar commented 4 months ago

Because we're splitting OpenPype into ayon-core and individual host addons, this PR would have to be re-created to target one of those.

We're closing it down, but we'll he happy for a new PR to ynput/ayon-core or the host addon repository once it's up.

mkolar commented 4 months ago

Apologies, this one I wanted to keep open and just kindly ask for port to AYON-core so we could merge both