Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: pillow-jxl module causing ImportErrors on macOS builds from the release workflow #758

Open
3 tasks done
CyanVoxel opened this issue Feb 1, 2025 · 0 comments
Open
3 tasks done
Labels
Priority: Medium An issue that shouldn't be be saved for last Type: Bug Something isn't working as intended Type: Installation Installing, building, and/or launching the program

Comments

@CyanVoxel
Copy link
Member

CyanVoxel commented Feb 1, 2025

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha v9.5.0 Pre-Release 1

Operating System & Version

macOS 15.1.1

Description

In macOS aarch builds created from the GitHub release workflow, the pillow-jxl module generates an ImportError and prevents the application from launching. As of a2f9685 there's a try/except wrapper around the import that still lets the application launch and ignores the pillow-jxl import if it can't be imported. The only side effect is naturally, JPEG-XL support doesn't work in these affected builds.

Expected Behavior

The pillow-jxl module should not encounter errors when importing, or at the very least there should be normal JPEG-XL support in the program.

Steps to Reproduce

  1. Without the patch from a2f9685, build the macOS release from the GitHub releases workflow. Currently I don't know how to reproduce this locally, and building from the tagstudio.spec file does not reproduce this issue for me.

Logs

When running the tagstudio executable file inside "TagStudio.app/Contents/MacOS" via the command line:

Last login: Sat Jan 18 06:39:26 on console
/Users/cyanvoxel/Downloads/TagStudio.app/Contents/MacOS/tagstudio ; exit;                                               
cyanvoxel@MPB-24 ~ % /Users/cyanvoxel/Downloads/TagStudio.app/Contents/MacOS/tagstudio ; exit;
2025-01-31 16:18:06 [info     ] [FFMPEG] Using FFprobe location: ffprobe
2025-01-31 16:18:06 [info     ] [FFMPEG] Using FFmpeg location: ffmpeg
Traceback (most recent call last):
  File "tag_studio.py", line 13, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/ts_qt.py", line 90, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/widgets/item_thumb.py", line 35, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/widgets/thumb_renderer.py", line 16, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "pillow_jxl/__init__.py", line 1, in <module>
ImportError: dlopen(/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libjxl.0.11.dylib
  Referenced from: <CD97B5D5-19C7-3B25-AB3F-4E23AB6A6DC5> /Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so
  Reason: tried: '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file), '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file)
[PYI-50818:ERROR] Failed to execute script 'tag_studio' due to unhandled exception: dlopen(/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libjxl.0.11.dylib
  Referenced from: <CD97B5D5-19C7-3B25-AB3F-4E23AB6A6DC5> /Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so
  Reason: tried: '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file), '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file)
[PYI-50818:ERROR] Traceback:
Traceback (most recent call last):
  File "tag_studio.py", line 13, in <module>
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/ts_qt.py", line 90, in <module>
    from src.qt.widgets.item_thumb import BadgeType, ItemThumb
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/widgets/item_thumb.py", line 35, in <module>
    from src.qt.widgets.thumb_renderer import ThumbRenderer
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "src/qt/widgets/thumb_renderer.py", line 16, in <module>
    import pillow_jxl  # noqa: F401
    ^^^^^^^^^^^^^^^^^
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "pillow_jxl/__init__.py", line 1, in <module>
ImportError: dlopen(/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libjxl.0.11.dylib
  Referenced from: <CD97B5D5-19C7-3B25-AB3F-4E23AB6A6DC5> /Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/pillow_jxl.cpython-312-darwin.so
  Reason: tried: '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file), '/Users/cyanvoxel/Downloads/TagStudio.app/Contents/Frameworks/pillow_jxl/../libjxl.0.11.dylib' (no such file)


Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...      93 completed.

[Process completed]
@CyanVoxel CyanVoxel added Priority: Medium An issue that shouldn't be be saved for last Type: Bug Something isn't working as intended Type: Installation Installing, building, and/or launching the program labels Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Type: Bug Something isn't working as intended Type: Installation Installing, building, and/or launching the program
Projects
None yet
Development

No branches or pull requests

1 participant