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

ModuleNotFoundError: No module named 'run' // run.py issue with QT_QPA_PLATFORM=wayland #1257

Open
6xthFNGR opened this issue Oct 4, 2024 · 0 comments
Labels
bug Bug reports.

Comments

@6xthFNGR
Copy link

6xthFNGR commented Oct 4, 2024

On starting dupeguru (Terminal $ dupeguru)

Error:

$ dupeguru
Traceback (most recent call last):
File "/usr/local/bin/dupeguru", line 33, in
sys.exit(load_entry_point('dupeGuru==4.3.1', 'console_scripts', 'dupeguru')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/dupeguru", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/init.py", line 205, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'run'

Py.test file IN A VENV

py.test core hscommon
================================================================ test session starts =================================================================
platform linux -- Python 3.12.3, pytest-7.4.4, pluggy-1.4.0
rootdir: /usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg
plugins: hypothesis-6.98.15
collected 514 items

core/tests/app_test.py ...................................... [ 7%]
core/tests/block_test.py ................ [ 10%]
core/tests/cache_test.py ................... [ 14%]
core/tests/directories_test.py ...................................... [ 21%]
core/tests/engine_test.py .............................................................................................. [ 39%]
core/tests/exclude_test.py ........................................ [ 47%]
core/tests/fs_test.py .... [ 48%]
core/tests/ignore_test.py ................. [ 51%]
core/tests/markable_test.py ............... [ 54%]
core/tests/prioritize_test.py ............... [ 57%]
core/tests/result_table_test.py .... [ 58%]
core/tests/results_test.py ........................................................................ [ 72%]
core/tests/scanner_test.py ....................................... [ 79%]
hscommon/tests/conflict_test.py ............ [ 82%]
hscommon/tests/notify_test.py .......... [ 84%]
hscommon/tests/path_test.py .. [ 84%]
hscommon/tests/selectable_list_test.py ..... [ 85%]
hscommon/tests/table_test.py ............................... [ 91%]
hscommon/tests/tree_test.py ............. [ 94%]
hscommon/tests/util_test.py .............................. [100%]

================================================================== warnings summary ==================================================================
../../../../../lib/python3/dist-packages/_pytest/cacheprovider.py:451
/usr/lib/python3/dist-packages/_pytest/cacheprovider.py:451: PytestCacheWarning: could not create cache path /usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: '/usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg/.pytest_cache'
config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../../../../../lib/python3/dist-packages/_pytest/stepwise.py:56
/usr/lib/python3/dist-packages/_pytest/stepwise.py:56: PytestCacheWarning: could not create cache path /usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg/.pytest_cache/v/cache/stepwise: [Errno 13] Permission denied: '/usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg/.pytest_cache'
session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================== 514 passed, 2 warnings in 6.33s ===========================================================

= requires sudo to perform as its VENV reaching a program outside VENV that wants write permissions... Another thing to fix.

Py.Test with sudo inside VENV, or within system Python:

sudo py.test core hscommon
[sudo] password for XXXX
================================================================ test session starts =================================================================
platform linux -- Python 3.12.3, pytest-7.4.4, pluggy-1.4.0
rootdir: /usr/local/lib/python3.12/dist-packages/dupeGuru-4.3.1-py3.12-linux-x86_64.egg
plugins: hypothesis-6.98.15
collected 514 items

core/tests/app_test.py ...................................... [ 7%]
core/tests/block_test.py ................ [ 10%]
core/tests/cache_test.py ................... [ 14%]
core/tests/directories_test.py ...................................... [ 21%]
core/tests/engine_test.py .............................................................................................. [ 39%]
core/tests/exclude_test.py ........................................ [ 47%]
core/tests/fs_test.py .... [ 48%]
core/tests/ignore_test.py ................. [ 51%]
core/tests/markable_test.py ............... [ 54%]
core/tests/prioritize_test.py ............... [ 57%]
core/tests/result_table_test.py .... [ 58%]
core/tests/results_test.py ........................................................................ [ 72%]
core/tests/scanner_test.py ....................................... [ 79%]
hscommon/tests/conflict_test.py ............ [ 82%]
hscommon/tests/notify_test.py .......... [ 84%]
hscommon/tests/path_test.py .. [ 84%]
hscommon/tests/selectable_list_test.py ..... [ 85%]
hscommon/tests/table_test.py ............................... [ 91%]
hscommon/tests/tree_test.py ............. [ 94%]
hscommon/tests/util_test.py .............................. [100%]

================================================================ 514 passed in 5.40s =================================================================

= Success.

So, dupeguru in system or sudo dupeguru in VENV should work.
But it doesnt -> see the first Error Message.

Testing further, I guess run.py, Qt and the Qt-Wayland Addon are the issue at the moment:

$ env QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ QT_QPA_PLATFORM=minimal python3 /usr/share/dupeguru/run.py
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
File "/usr/share/dupeguru/run.py", line 88, in
sys.exit(main())
^^^^^^
File "/usr/share/dupeguru/run.py", line 71, in main
from qt.app import DupeGuru
File "/usr/share/dupeguru/qt/app.py", line 22, in
from core.app import AppMode, DupeGuru as DupeGuruModel
File "/usr/share/dupeguru/core/app.py", line 27, in
from core.pe.photo import get_delta_dimensions
ModuleNotFoundError: No module named 'core.pe.photo'

$ env QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ QT_QPA_PLATFORM=wayland python3 /usr/share/dupeguru/run.py
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimal (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), minimalegl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), offscreen (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), vnc (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-egl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-xcomposite-egl (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), wayland-xcomposite-glx (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), xcb (from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/), linuxfb, minimal, offscreen, vnc, webgl, xcb.

Aborted (core dumped)

Wayland plugin is available, but wont be initialized.

System:
Ubuntu 24.04

uname -a
Linux 6.8.0-45-lowlatency #45.1-Ubuntu SMP PREEMPT_DYNAMIC x86_64 GNU/Linux

Python Virtual Environment:

Python 3.12.3
dupeguru 4.3.1-4build1
pip3 install -r dupeguru/requirements.txt - Successful
pip3 list
alabaster 0.7.16
babel 2.16.0
certifi 2024.8.30
charset-normalizer 3.3.2
distro 1.9.0
docutils 0.21.2
idna 3.10
imagesize 1.4.1
Jinja2 3.1.4
MarkupSafe 2.1.5
mutagen 1.47.0
packaging 24.1
pip 24.0
polib 1.2.0
Pygments 2.18.0
PyQt5 5.15.11
PyQt5-Qt5 5.15.15
PyQt5_sip 12.15.0
requests 2.32.3
semantic-version 2.10.0
Send2Trash 1.8.3
setuptools 75.1.0
snowballstemmer 2.2.0
Sphinx 7.4.7
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 2.0.0
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
urllib3 2.2.3
xxhash 3.5.0

@6xthFNGR 6xthFNGR added the bug Bug reports. label Oct 4, 2024
@6xthFNGR 6xthFNGR changed the title ModuleNotFoundError: No module named 'run' ModuleNotFoundError: No module named 'run' // run.py issue with QT_QPA_PLATFORM=wayland Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports.
Projects
None yet
Development

No branches or pull requests

1 participant