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

Explicitly state where qt plugins are #1460

Closed
wants to merge 1 commit into from

Conversation

roomrys
Copy link
Collaborator

@roomrys roomrys commented Aug 16, 2023

Description

Apparently, if different versions of cv2 and pyqt are used, then we run into trouble...

This is what trouble looks like for us (action):

 tests/test_version.py .                                                  [  9%]
Fatal Python error: Aborted

Current thread 0x00007fc7f5b48b80 (most recent call first):
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pytestqt/plugin.py", line 66 in qapp
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 902 in call_fixture_func
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1123 in pytest_fixture_setup
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 80 in _multicall
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 112 in _hookexec
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 433 in __call__
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 1069 in execute
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 693 in _compute_fixture_value
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 607 in _get_active_fixturedef
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 585 in getfixturevalue
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/fixtures.py", line 566 in _fillfixtures
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/python.py", line 1791 in setup
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 494 in setup
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 157 in pytest_runtest_setup
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 80 in _multicall
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 112 in _hookexec
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 433 in __call__
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 262 in <lambda>
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 341 in from_call
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 262 in call_runtest_hook
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 222 in call_and_report
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 127 in runtestprotocol
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 80 in _multicall
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 112 in _hookexec
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 433 in __call__
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/main.py", line 349 in pytest_runtestloop
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 80 in _multicall
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 112 in _hookexec
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 433 in __call__
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/main.py", line 324 in _main
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/main.py", line 270 in wrap_session
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/main.py", line 317 in pytest_cmdline_main
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_callers.py", line 80 in _multicall
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_manager.py", line 112 in _hookexec
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pluggy/_hooks.py", line 433 in __call__
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 167 in main
  File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/_pytest/config/__init__.py", line 189 in console_main
  File "/opt/hostedtoolcache/Python/3.7.17/x64/bin/pytest", line 8 in <module>
/home/runner/work/_temp/eb67c12d-8c8e-40e1-988c-e5deff7da563.sh: line 1:  2267 Aborted                 (core dumped) pytest tests
tests/gui/test_app.py 
Error: Process completed with exit code 134.

Sure, we could try to get the version of cv2 to match, but that isn't always possible (see #1258 90649c4 to 5dc74b2 where our dependencies require a different version of cv2) resulting in the same error (action).

This PR aims to merge what was thought to be a hack at the time into a robustifying feature.

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (robustify)

Does this address any currently open issues?

[list open issues here]

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #1460 (b21c170) into develop (e0eebb2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop    #1460   +/-   ##
========================================
  Coverage    73.05%   73.05%           
========================================
  Files          134      134           
  Lines        23857    23857           
========================================
  Hits         17429    17429           
  Misses        6428     6428           
Files Changed Coverage Δ
sleap/gui/app.py 75.38% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@roomrys
Copy link
Collaborator Author

roomrys commented Sep 6, 2023

This pull request did not fix the problem it was intended to fix.

@roomrys roomrys closed this Sep 6, 2023
@roomrys roomrys deleted the liezl/handle-cv2-qtpy-mismatch branch September 6, 2023 16:51
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 this pull request may close these issues.

1 participant