Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Core: Headless publish failing without GL lib #6205

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

fabiaserra
Copy link
Contributor

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

@ynbot ynbot added size/XS Denotes a PR changes 0-99 lines, ignoring general files type: bug Something isn't working labels Feb 7, 2024
@fabiaserra fabiaserra changed the title Move imports to workaround importing qt if using headless Core: Headless publish failing without GL lib Feb 7, 2024
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

@mkolar
Copy link
Member

mkolar commented Feb 9, 2024

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 mkolar closed this Feb 9, 2024
@ynbot ynbot added this to the next-patch milestone Feb 9, 2024
@mkolar mkolar reopened this Feb 9, 2024
@mkolar
Copy link
Member

mkolar commented Feb 9, 2024

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

@jakubjezek001 jakubjezek001 removed this from the next-patch milestone Feb 15, 2024
@antirotor antirotor merged commit 6740d29 into ynput:develop Mar 25, 2024
1 check passed
@ynbot ynbot added this to the next-patch milestone Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
port to AYON size/XS Denotes a PR changes 0-99 lines, ignoring general files target: OpenPype type: bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants