raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes
https://raidionics.github.io/
BSD 2-Clause "Simplified" License
31 stars 4 forks source link

Bug: Launching latest artifact fails on macOS #43

Closed andreped closed 11 months ago

andreped commented 11 months ago

Describe the bug Tried to download the latest artifact, install it, and run. The icon popped up but closed immediantly.

Computer settings (please complete the following information):

To Reproduce Install the latest artifact, and go to /Applications/Raidionics.app/Contents/MacOS/ and then launch with ./Raidionics.

Error messages

andreped@thomasl-MBP /Applications % cd Raidionics.app/
andreped@thomasl-MBP /Applications % open -a Raidionics.app 
andreped@thomasl-MBP /Applications % cd Raidionics.app/Contents/MacOS 
andreped@thomasl-MBP MacOS % ./Raidionics 
Traceback (most recent call last):
  File "main.py", line 8, in <module>
ImportError: could not import module 'PySide6.QtGui'
[14837] Failed to execute script 'main' due to unhandled exception!
andreped commented 11 months ago

Tried using a newer PyInstaller version (v5.13.2) did not resolve the issue.

andreped commented 11 months ago

@dbouget Could you test the latest artifact on Windows. Apparently, this was also an issue with PySide6 on windows: https://bugreports.qt.io/browse/PYSIDE-1891

Not sure if it has been resolved.

Could also be an issue with this specific release. Upgrading to the latest PySide6 (v6.5.2), still compatible with Python 3.7, might resolve the issue: https://pypi.org/project/PySide6/

andreped commented 11 months ago

This seems like a bug with PySide6 (not PyInstaller): https://stackoverflow.com/questions/71919812/after-upgrading-pyside6-gives-error-no-module-named-pyside6-qtwidgets

I can try building with latest to see if it resolves the issue.

andreped commented 11 months ago

Just managed to reproduce the issue on macOS.

I got the same issue after simply making the virtualenv + installing deps and running main.py. So this is not a PyInstaller issue, but rather a PySide6 bug, as I thought! Will try to upgrade PySide6 to see if it resolves the issue.

andreped commented 11 months ago

I tried to simply upgrade the PySide6 version, but this did not resolve the issue. These were the versions installed:

PySide6-6.5.2 PySide6-Addons-6.5.2 PySide6-Essentials-6.5.2 shiboken6-6.5.2

Or maybe it did, because now I get this error:

from PySide6.QtWidgets import QApplication
andreped commented 11 months ago

As suggested in this thread, I managed to resolve the issue by simply reinstalling PySide6 after install.

Will make a PR.

In the future, this bug will likely be resolved, but for now, we will need this workaround.

andreped commented 11 months ago

Fixed in cd8cd29cbad13e8719992f0cc0427493ca3d7be7