Skip to content

Qt module usage in plugins cause conflict with USD (Tf module) loading halting iniitialization. #103

@kwokcb

Description

@kwokcb

Issue

If you do the install:

pip install QuiltiX
pip install git+https://github.com/PrismPipeline/[email protected]

then try and run tests or load in a plugin you get this error (e.g for first test)

======================================================================
ERROR: test_node_creation (unittest.loader._FailedTest.test_node_creation)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_node_creation
Traceback (most recent call last):
  File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\unittest\loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\unittest\loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "D:\Work\materialx\QuiltiX\tests\test_node_creation.py", line 1, in <module>
    from examples.create_all_available_nodes import create_all_available_nodes
  File "D:\Work\materialx\QuiltiX\examples\create_all_available_nodes.py", line 1, in <module>
    from tests import helpers
  File "D:\Work\materialx\QuiltiX\tests\helpers.py", line 7, in <module>
    from QuiltiX import quiltix
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\QuiltiX\quiltix.py", line 25, in <module>
    from pxr import Usd, UsdShade
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\pxr\Usd\__init__.py", line 7, in <module>
    from pxr import Tf
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\pxr\Tf\__init__.py", line 161, in <module>
    PreparePythonModule()
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\pxr\Tf\__init__.py", line 86, in PreparePythonModule
    module = importlib.import_module(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\home\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing _tf: A dynamic link library (DLL) initialization routine failed.

This is the installed packages in a venv:

Package                  Version
------------------------ -------
MaterialX                1.39.3
NodeGraphQt_QuiltiX_fork 0.7.0
OpenUSD_build            1.0
packaging                25.0
pip                      25.1.1
pluggy                   1.6.0
PyOpenGL                 3.1.9
PyOpenGL-accelerate      3.1.9
PySide6                  6.5.3
PySide6-Addons           6.5.3
PySide6-Essentials       6.5.3
QtPy                     2.4.3
QuiltiX                  0.8.0
setuptools               79.0.1
shiboken6                6.5.3
wheel                    0.45.1

Running with Python 3.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream issueSome dependency QuiltiX relies on has a bug/issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions