hydrus icon indicating copy to clipboard operation
hydrus copied to clipboard

MacOS binary: No module named PyQt5

Open docchaoswizard opened this issue 2 years ago • 5 comments

Hydrus version

v505

Qt major version

Qt 6

Operating system

macOS 12 "Monterey" (Apple silicon)

Install method

Extract

Install and OS comments

No response

Bug description and reproduction

When launching Hydrus via the Bundle (Not CLI) it simply doesn't start, just silently dies. When running via the shell we get the error-messages below. The last known working Version is 504. The hydrus_crash.log pretty much contains the same informations. Let me know if you need anything else.

Log output

/Applications/Hydrus\ Network.app/Contents/MacOS/client
PySide6/__init__.py: Unable to import Shiboken from /Applications/Hydrus Network.app/Contents/MacOS, /Applications/Hydrus Network.app/Contents/MacOS/lib
PySide6/__init__.py: Unable to import Shiboken from /Applications/Hydrus Network.app/Contents/MacOS, /Applications/Hydrus Network.app/Contents/MacOS/lib
Traceback (most recent call last):
  File "/Applications/Hydrus Network.app/Contents/MacOS/hydrus/hydrus_client.py", line 24, in <module>
    from hydrus.client.gui import QtInit
  File "/Applications/Hydrus Network.app/Contents/MacOS/hydrus/client/gui/QtInit.py", line 45, in <module>
    from qtpy import QtCore as QC
  File "/Applications/Hydrus Network.app/Contents/MacOS/lib/qtpy/QtCore.py", line 15, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5'

Critical boot error occurred! Details written to hydrus_crash.log in either db dir or user dir!

docchaoswizard avatar Nov 15 '22 16:11 docchaoswizard

I was a bit confused yesterday, sorry for that, running the correct binary shows the issue still persists with v506:

PySide6/__init__.py: Unable to import Shiboken from /Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS, /Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS/lib
PySide6/__init__.py: Unable to import Shiboken from /Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS, /Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS/lib
Traceback (most recent call last):
  File "/Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS/hydrus/hydrus_client.py", line 24, in <module>
    from hydrus.client.gui import QtInit
  File "/Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS/hydrus/client/gui/QtInit.py", line 45, in <module>
    from qtpy import QtCore as QC
  File "/Users/xxx/Downloads/Hydrus Network.app/Contents/MacOS/lib/qtpy/QtCore.py", line 15, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5'

I am reopening the issue.

docchaoswizard avatar Nov 20 '22 13:11 docchaoswizard

Thank you for this report, and sorry for the trouble. I have been working on the same issue with another macOS user and have updated the client to report more information for this in tomorrow's release. Please try that and let me know what different message you get, if any!

This is an odd one. Not only is it selecting the wrong Qt library to use, the exact line it is throwing an error on is supposed to be after it found a good Qt to use. Furthermore, there's no obvious difference between v505 and v504's built Qt (PySide6).

If you know how to set such things, you might have luck setting this environment variable: QT_API=pyside6

hydrusnetwork avatar Nov 23 '22 04:11 hydrusnetwork

Running 13.0.1 on an Intel Mac.

v507 binary crashes with the same error. Running from source works fine when I select 5 or 6 from the setup_venv.command

Michael-Bell avatar Nov 25 '22 07:11 Michael-Bell

Yep, still crashes. Here are the details:

╰─$ /Applications/Hydrus\ Network.app/Contents/MacOS/client
PySide6/__init__.py: Unable to import Shiboken from /Applications/Hydrus Network.app/Contents/MacOS, /Applications/Hydrus Network.app/Contents/MacOS/lib
PySide6/__init__.py: Unable to import Shiboken from /Applications/Hydrus Network.app/Contents/MacOS, /Applications/Hydrus Network.app/Contents/MacOS/lib
Traceback (most recent call last):
  File "/Applications/Hydrus Network.app/Contents/MacOS/hydrus/client/gui/QtInit.py", line 120, in <module>
    from qtpy import QtCore as QC
  File "/Applications/Hydrus Network.app/Contents/MacOS/lib/qtpy/QtCore.py", line 15, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Hydrus Network.app/Contents/MacOS/hydrus/hydrus_client.py", line 24, in <module>
    from hydrus.client.gui import QtInit
  File "/Applications/Hydrus Network.app/Contents/MacOS/hydrus/client/gui/QtInit.py", line 156, in <module>
    raise Exception( message )
Exception: One of the Qt modules could not be loaded! Error was: No module named 'PyQt5'

Of the different Qts, qtpy selected: PySide2 (not selected), PySide6 (not selected), PyQt5 (selected), PyQt6 (not selected). Here is info on QT_API: No QT_API set.

If you are running from a built release, please let hydev know!

Critical boot error occurred! Details written to hydrus_crash.log in either db dir or user dir!

The same happens when i set QT_API=pyside6 (Or any other Qts). My python Version is Python 3.10.8, but that shouldn't matter.

Do you need any more informations? Oh by the way, it doesn't matter if i start the client through Rosetta on Apple Silicon or natively on an Intel Mac.

docchaoswizard avatar Nov 25 '22 09:11 docchaoswizard

I'm having the same issue. Shouldn't it make a call to PyQt6?

KamillaPup avatar Nov 27 '22 02:11 KamillaPup

This is the crash log using 508:

hydrus_crash.log

livyathan avatar Dec 01 '22 18:12 livyathan

Here is the crash from the 508 fix hydrus_crash.log

KamillaPup avatar Dec 05 '22 19:12 KamillaPup

I just want to confirm that 509 fixed this <3

Also Hydrus works great in Ventura.

KamillaPup avatar Dec 14 '22 20:12 KamillaPup

v510 works great! Thank you very much :-) I think we can close this.

@KamillaPup Thank you for that information! Now i can upgrade in peace ✌️

docchaoswizard avatar Dec 15 '22 16:12 docchaoswizard