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

Fix tests on macos-14 (currently the macos-latest github runner) #558

Closed
constantinpape opened this issue Apr 29, 2024 · 1 comment · Fixed by #595
Closed

Fix tests on macos-14 (currently the macos-latest github runner) #558

constantinpape opened this issue Apr 29, 2024 · 1 comment · Fixed by #595

Comments

@constantinpape
Copy link
Contributor

The MAC tests fail due to some problem with running the GUI tests. This happens since a couple of days ago, maybe due to some update in the MAC runner?

See the corresponding error in the CI below.

Run aganders3/headless-gui@v2
running on darwin
/bin/bash -l -c pytest
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/_pytest/main.py", line 281, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1130, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pluggy/_hooks.py", line 535, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pytestqt/plugin.py", line 243, in pytest_configure
INTERNALERROR>     qt_api.set_qt_api(config.getini("qt_api"))
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pytestqt/qt_compat.py", line 85, in set_qt_api
INTERNALERROR>     or self._guess_qt_api()
INTERNALERROR>        ^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pytestqt/qt_compat.py", line 76, in _guess_qt_api
INTERNALERROR>     if _can_import(f"{backend}.QtCore"):
INTERNALERROR>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pytestqt/qt_compat.py", line 67, in _can_import
INTERNALERROR>     _import(name)
INTERNALERROR>   File "/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/pytestqt/qt_compat.py", line 29, in _import
INTERNALERROR>     return __import__(name)
INTERNALERROR>            ^^^^^^^^^^^^^^^^
INTERNALERROR> ImportError: dlopen(/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so, 0x0002): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore
INTERNALERROR>   Referenced from: <5DB832BD-87BC-3750-B686-5A0A711D09B3> /Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/PyQt5/QtCore.abi3.so
INTERNALERROR>   Reason: tried: '/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/runner/micromamba/envs/sam/lib/python3.11/site-packages/PyQt5/Qt5/lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/runner/micromamba/envs/sam/bin/../lib/QtCore.framework/Versions/5/QtCore' (no such file), '/Users/runner/micromamba/envs/sam/bin/../lib/QtCore.framework/Versions/5/QtCore' (no such file)
Error: The process '/bin/bash' failed with exit code 3
The process '/bin/bash' failed with exit code 3

Any idea how this could be fixed @GenevieveBuckley ?

@GenevieveBuckley GenevieveBuckley changed the title Fix tests on MAC Fix tests on macos-14 (currently the macos-latest github runner) May 8, 2024
@GenevieveBuckley
Copy link
Collaborator

I have a fix here #595 - it seems pip was uninstalling the working version of pyqt we already had and reinstalling a different version that does not work well on M1 Mac machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants