Description of problem: hp-setup fails with a Python traceback, ending with "ModuleNotFoundError: No module named 'ui5'" Version-Release number of selected component (if applicable): hplip-3.21.2-13.fc35.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install hplip 2. Execute hp-setup 3. Actual results: $ hp-setup HP Linux Imaging and Printing System (ver. 3.21.2) Printer/Fax Setup Utility ver. 9.0 Copyright (c) 2001-18 HP Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. Traceback (most recent call last): File "/usr/bin/hp-setup", line 313, in <module> ui = import_module(ui_package + ".setupdialog") File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'ui5' Expected results: Additional info: Previous duplicates include bug 1368737, bug 1530331, bug 1794147; the latter (apparently fixed in Fedora 32) says it should report "error: Install the hplip-gui package for graphical support." but that doesn't happen.
Hi Peter, thank you for reporting the issue! HP tools uses import_dialog() function for checking for GUI. However the function lives in base/utils.py which is a different dir level than where ui5 module is, so the function uses indirect import like: import ui5 which has a downside - IMO it looks everywhere in python module search path, so it can load other module than you expect - which happened this time. But of course this module doesn't have classes which HP script expects, so it fails later. The proper fix would be to move the function to the same level as ui5 module, but since upstream is rarely responsive, I'll work it around by importing some class from ui5 module...
FYI the current hplip will show error message if hplip-gui is not installed and automatically switches to interactive mode.
FEDORA-2021-08c10ee211 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-08c10ee211
FEDORA-2021-ce9bb5d10b has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ce9bb5d10b
FEDORA-2021-08c10ee211 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-08c10ee211` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-08c10ee211 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-ce9bb5d10b has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-ce9bb5d10b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ce9bb5d10b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-08c10ee211 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-ce9bb5d10b has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.