OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Core: Headless publish failing without GL lib

Open fabiaserra opened this issue 6 months ago • 2 comments

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

fabiaserra avatar Feb 07 '24 21:02 fabiaserra