UncleGoogle / galaxy-integration-humblebundle

Humble Bundle integration for GOG Galaxy 2.0
GNU General Public License v3.0
186 stars 19 forks source link

Doesn't work anymore on MacOS: cannot import name '_psutil_osx' #61

Closed neurolit closed 4 years ago

neurolit commented 4 years ago

Hi,

After having manually upgraded to v0.5.3, I can't launch the HumbleBundle integration. In logs, I can find a Python error:

2019-11-24 10:30:30,783 - root - ERROR - Plugin exception
Traceback (most recent call last):
  File "/Applications/GOG Galaxy.app/Contents/Resources/plugin_runner.py", line 35, in <module>
    module = importlib.import_module(filename)
  File "/Applications/GOG Galaxy.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/plugin.py", line 27, in <module>
    from local import AppFinder
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/local/__init__.py", line 7, in <module>
    from local.macappfinder import MacAppFinder as AppFinder  # type: ignore[misc] # noqa
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/local/macappfinder.py", line 1, in <module>
    from local.baseappfinder import BaseAppFinder
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/local/baseappfinder.py", line 8, in <module>
    from local.localgame import LocalHumbleGame
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/local/localgame.py", line 4, in <module>
    import psutil
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/modules/psutil/__init__.py", line 155, in <module>
    from . import _psosx as _psplatform
  File "/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/modules/psutil/_psosx.py", line 16, in <module>
    from . import _psutil_osx as cext
ImportError: cannot import name '_psutil_osx' from 'psutil' (/Users/XXXXX/Library/Application Support/GOG.com/Galaxy/plugins/installed/humblebundle_0.5.3/modules/psutil/__init__.py)

Do you know how I could solve this issue?

UncleGoogle commented 4 years ago

Hey, I'm building the plugin manually from Windows, so apparently _psutil_osx.py is not included. I have to prepare build CI with macOS and Windows separately.

Until this will be done, I recommend to use FriendsOfGalaxy fork - they have build process already setup. As Galaxy uses their releases (mac and win separately), just do as follow:

Warning: macOS installed games detection is not tested and probably won't work for now. You can contribute here: #13 to help me create best solution. Thanks!

UncleGoogle commented 4 years ago

@neurolit Maybe you would like to test new macOS version with local games support: humble_mac.zip Scans /Applications by default

UncleGoogle commented 4 years ago

Now it should work. I've published release for Mac and Windows separately