Bug 2318578 - [abrt] DisplayCAL: module(): worker.py:15:<module>:ModuleNotFoundError: No module named 'pipes'
Summary: [abrt] DisplayCAL: module(): worker.py:15:<module>:ModuleNotFoundError: No mo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: DisplayCAL
Version: 41
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:ad086e04dce3ecd8ff20acf1713...
: 2339107 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-14 17:27 UTC by Brian Morrison
Modified: 2025-05-14 01:19 UTC (History)
10 users (show)

Fixed In Version: DisplayCAL-3.9.16-2.fc42 DisplayCAL-3.9.16-2.fc41
Clone Of:
Environment:
Last Closed: 2025-05-06 01:16:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (756 bytes, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: environ (3.67 KB, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: mountinfo (5.10 KB, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: open_fds (1.60 KB, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: namespaces (171 bytes, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: backtrace (8.98 KB, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: cpuinfo (3.07 KB, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details
File: machineid (134 bytes, text/plain)
2024-10-14 17:27 UTC, Brian Morrison
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources DisplayCAL pull-request 1 0 None None None 2024-10-31 18:52:48 UTC

Description Brian Morrison 2024-10-14 17:27:40 UTC
Version-Release number of selected component:
DisplayCAL-3.9.12-5.fc41

Additional info:
reporter:       libreport-2.17.15
kernel:         6.11.3-300.fc41.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/displaycal-apply-profiles
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-z\x2ddisplaycal\x2dapply\x2dprofiles-555395.scope
uid:            1000
reason:         worker.py:15:<module>:ModuleNotFoundError: No module named 'pipes'
executable:     /usr/bin/displaycal-apply-profiles
type:           Python3
package:        DisplayCAL-3.9.12-5.fc41
runlevel:       N 5
exception_type: ModuleNotFoundError
crash_function: module
interpreter:    python3-3.13.0-1.fc41.x86_64

Truncated backtrace:
#1 [/usr/lib64/python3.13/site-packages/DisplayCAL/worker.py:15] <module>
#2 [/usr/lib64/python3.13/site-packages/DisplayCAL/profile_loader.py:1969] apply_profiles
#3 [/usr/lib64/python3.13/site-packages/DisplayCAL/profile_loader.py:2161] apply_profiles_and_warn_on_error
#4 [/usr/lib64/python3.13/site-packages/DisplayCAL/profile_loader.py:1289] __init__
#5 [/usr/lib64/python3.13/site-packages/DisplayCAL/profile_loader.py:4012] main
#6 [/usr/bin/displaycal-apply-profiles:17] <module>

Comment 1 Brian Morrison 2024-10-14 17:27:43 UTC
Created attachment 2052084 [details]
File: os_info

Comment 2 Brian Morrison 2024-10-14 17:27:44 UTC
Created attachment 2052085 [details]
File: environ

Comment 3 Brian Morrison 2024-10-14 17:27:45 UTC
Created attachment 2052086 [details]
File: mountinfo

Comment 4 Brian Morrison 2024-10-14 17:27:46 UTC
Created attachment 2052087 [details]
File: open_fds

Comment 5 Brian Morrison 2024-10-14 17:27:48 UTC
Created attachment 2052088 [details]
File: namespaces

Comment 6 Brian Morrison 2024-10-14 17:27:49 UTC
Created attachment 2052089 [details]
File: backtrace

Comment 7 Brian Morrison 2024-10-14 17:27:51 UTC
Created attachment 2052090 [details]
File: cpuinfo

Comment 8 Brian Morrison 2024-10-14 17:27:52 UTC
Created attachment 2052091 [details]
File: machineid

Comment 9 Dmitry Burstein 2024-10-30 15:50:49 UTC
Can confirm the same: running the program gives an immediate error message as follows

Fatal error: No module named 'pipes'

Traceback (most recent call last):
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 536, in main
    _main(module, name, app_lock_file_name)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 521, in _main
    from DisplayCAL.display_cal import main
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/display_cal.py", line 107, in <module>
    from DisplayCAL import madvr
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/madvr.py", line 31, in <module>
    from DisplayCAL import worker_base
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/worker_base.py", line 8, in <module>
    import pipes
ModuleNotFoundError: No module named 'pipes'

Comment 11 Brian Morrison 2024-10-31 22:49:27 UTC
Well, I tried to build this locally to test the idea but I've run into a good few python errors after I managed to sort out some package BuildRequire errors.

This is the last one where it falls over:

    File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/install_data.py", line 61, in run
      if not os.path.isabs(dir):
             ~~~~~~~~~~~~~^^^^^
    File "<frozen posixpath>", line 62, in isabs
  TypeError: expected str, bytes or os.PathLike object, not tuple
  error: subprocess-exited-with-error
  
  × Building wheel for DisplayCAL (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 /usr/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /home/bdm/rpmbuild/BUILD/DisplayCAL-3.9.14-build/DisplayCAL-3.9.14/.pyproject-builddir/tmpvf74y520
  cwd: /home/bdm/rpmbuild/BUILD/DisplayCAL-3.9.14-build/DisplayCAL-3.9.14
  Building wheel for DisplayCAL (pyproject.toml) ... error
  ERROR: Failed building wheel for DisplayCAL
Failed to build DisplayCAL
ERROR: Failed to build one or more wheels


Maybe someone with better knowledge can get this working, it's beyond mine.

Comment 12 Josh Stone 2024-10-31 23:28:22 UTC
Earlier I added a link to a PR I made for the update, but I'll repeat it here for visibility:

https://src.fedoraproject.org/rpms/DisplayCAL/pull-request/1

I had to update one patch, and drop one that was outdated, but I didn't see any errors like that.

Comment 13 Brian Morrison 2024-10-31 23:41:22 UTC
I should have just grabbed the scratch build instead of trying to fix it up myself.

I think I managed to get one of the patches wrong somehow.

In any case I have installed the scratch build and will report if it doesn't sort out the bug.

Comment 14 Brian Morrison 2024-11-01 17:42:33 UTC
And indeed, everything is now working normally again with the scratch build rpm installed.

Comment 15 Filippo Rossoni 2024-11-03 14:37:41 UTC
Run displaycal  

Acquired lock file: <DisplayCAL.main.AppLock object at 0x7f988039acf0>
displaycal 3.9.12 2024-03-19T22:00:30Z
fedora 41  x86_64
Python 3.13.0 (main, Oct  8 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)]
Faulthandler 
wxPython 4.2.1 gtk3 (phoenix) wxWidgets 3.2.5
Encoding: utf-8
File system encoding: utf-8
Loading /home/filippor/.config/DisplayCAL/DisplayCAL.ini
listening
writing to lock file: port: 15411
Traceback (most recent call last):
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 536, in main
    _main(module, name, app_lock_file_name)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 521, in _main
    from DisplayCAL.display_cal import main
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/display_cal.py", line 107, in <module>
    from DisplayCAL import madvr
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/madvr.py", line 31, in <module>
    from DisplayCAL import worker_base
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/worker_base.py", line 8, in <module>
    import pipes
ModuleNotFoundError: No module named 'pipes'
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Traceback (most recent call last):                                           â
â   File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 536,   â
â in main                                                                      â
â     _main(module, name, app_lock_file_name)                                  â
â     ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                  â
â   File "/usr/lib64/python3.13/site-packages/DisplayCAL/main.py", line 521,   â
â in _main                                                                     â
â     from DisplayCAL.display_cal import main                                  â
â   File "/usr/lib64/python3.13/site-packages/DisplayCAL/display_cal.py", line â
â 107, in <module>                                                             â
â     from DisplayCAL import madvr                                             â
â   File "/usr/lib64/python3.13/site-packages/DisplayCAL/madvr.py", line 31,   â
â in <module>                                                                  â
â     from DisplayCAL import worker_base                                       â
â   File "/usr/lib64/python3.13/site-packages/DisplayCAL/worker_base.py", line â
â 8, in <module>                                                               â
â     import pipes                                                             â
â ModuleNotFoundError: No module named 'pipes'                                 â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Exiting displaycal
Ran application exit handlers


reporter:       libreport-2.17.15
kernel:         6.11.5-300.fc41.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/displaycal-apply-profiles
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-z\x2ddisplaycal\x2dapply\x2dprofiles
uid:            1000
reason:         worker.py:15:<module>:ModuleNotFoundError: No module named 'pipes'
executable:     /usr/bin/displaycal-apply-profiles
type:           Python3
package:        DisplayCAL-3.9.12-5.fc41
runlevel:       N 5
exception_type: ModuleNotFoundError
crash_function: module
interpreter:    python3-3.13.0-1.fc41.x86_64

Comment 16 mrh 2024-11-10 18:17:36 UTC
For it's worth...

From: https://docs.python.org/3.12/library/pipes.html

pipes — Interface to shell pipelines
Source code: Lib/pipes.py

Deprecated since version 3.11, will be removed in version 3.13: The pipes module is deprecated (see PEP 594 for details). Please use the subprocess module instead.

Comment 17 mrh 2024-11-10 19:12:23 UTC
A quick look and found that pipes is used only here and called only once by the looks of things. This is for DisplayCAL-3.9.12:

worker.py:15:import pipes

worker_base.py:8:import pipes
worker_base.py:425:            item = pipes.quote(item)

Pipes replacement is shlex.quote which is the same as pipes.quote which is deprecated after moving to shlex.

snippet
...
from shlex import quote
...
def cmd_quote(string):
    import sys
    if int(sys.version[2]) < 3:
        import pipes
        return pipes.quote(string)
    else:
        import shlex
        return shlex.quote(string)

Comment 18 Rafael Jeffman 2024-12-27 22:54:45 UTC
Any change that we get a fix for displaycal?

Is any help needed?

Comment 19 Fedora Update System 2025-01-06 17:43:09 UTC
FEDORA-2025-1045fdae05 (DisplayCAL-3.9.14-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-1045fdae05

Comment 20 Fedora Update System 2025-01-07 02:41:24 UTC
FEDORA-2025-1045fdae05 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-1045fdae05`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-1045fdae05

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Dmitry Burstein 2025-01-07 11:32:52 UTC
I've installed 3.9.14-1 version, but after giving the following error message, it stays indefinitely on "Starting up" widget.

'WindowList_iterator' object is not iterable

Traceback (most recent call last):
  File "/usr/lib64/python3.13/site-packages/wx/core.py", line 3427, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
                  ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/display_cal.py", line 19520, in setup_frame
    app.frame = MainFrame(self.worker)
                ~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/display_cal.py", line 1876, in __init__
    self.set_child_ctrls_as_attrs(self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/wxwindows.py", line 2346, in set_child_ctrls_as_attrs
    for child in parent.GetAllChildren():
                 ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/site-packages/DisplayCAL/wxaddons.py", line 101, in GetAllChildren
    children = [child for child in self.GetChildren() if child not in skip]
                                   ~~~~~~~~~~~~~~~~^^
TypeError: 'WindowList_iterator' object is not iterable


WARNING: Your version of wxPython (4.2.1) is outdated and no longer supported. You should consider updating to wxPython 4.2.2 or newer.

Comment 22 Josh Stone 2025-01-21 17:02:09 UTC
*** Bug 2339107 has been marked as a duplicate of this bug. ***

Comment 23 csamyn 2025-01-22 13:34:30 UTC
I also tried version 3.9.14-1.fc41 and had exactly the same proble as  Dmitry Burstein.

Comment 24 TJ 2025-02-02 08:47:11 UTC
Bug was noted at the source. Not sure if it's python 3.13 relate or such but a fix is noted at the link below.

https://github.com/eoyilmaz/displaycal-py3/issues/474#issuecomment-2575975055

I used rpmrebuild to edit the noted python files which resolved the issue. Perhaps this breaks compatibility when not using python 3.13 or such, but it works on my current Bazzite build. Not sure if it's a fix at the source or perhaps warrants a patch to the rpm build.

Comment 25 Artem Korolev 2025-02-27 00:47:02 UTC
just started up my fedora workstation 41 and logged into account


reporter:       libreport-2.17.15
kernel:         6.13.4-200.fc41.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/displaycal-apply-profiles
cgroup:         0::/user.slice/user-1001.slice/user/app.slice/app-gnome-z\x2ddisplaycal\x2dapply\x2dprofiles-2655.scope
uid:            1001
reason:         worker.py:15:<module>:ModuleNotFoundError: No module named 'pipes'
executable:     /usr/bin/displaycal-apply-profiles
type:           Python3
package:        DisplayCAL-3.9.12-5.fc41
runlevel:       N 5
exception_type: ModuleNotFoundError
crash_function: module
interpreter:    python3-3.13.2-1.fc41.x86_64
comment:        just started up my fedora workstation 41 and logged into account

Comment 26 Fedora Update System 2025-05-04 13:31:46 UTC
FEDORA-2025-ebb9d427b6 (DisplayCAL-3.9.15-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-ebb9d427b6

Comment 27 Dmitry Burstein 2025-05-04 17:58:26 UTC
Tried out the above version, and at starting the calibration process, got the following error message:

Invalid format specifier '!r' for object of type 'str'

Traceback (most recent call last):
  File "/usr/lib64/python3.13/site-packages/wx/core.py", line 3427, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
                  ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/DisplayCAL/display_cal.py", line 10292, in start_measureframe_subprocess
    f"sys.path.insert(0, {pydir:!r});"
                         ^^^^^^^^^^
ValueError: Invalid format specifier '!r' for object of type 'str'

Comment 28 Fedora Update System 2025-05-05 02:29:33 UTC
FEDORA-2025-1045fdae05 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-1045fdae05`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-1045fdae05

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 29 Fedora Update System 2025-05-05 02:58:16 UTC
FEDORA-2025-ebb9d427b6 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-ebb9d427b6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-ebb9d427b6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 30 Fedora Update System 2025-05-06 01:16:23 UTC
FEDORA-2025-ebb9d427b6 (DisplayCAL-3.9.16-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 31 Fedora Update System 2025-05-06 02:42:52 UTC
FEDORA-2025-1045fdae05 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-1045fdae05`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-1045fdae05

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Fedora Update System 2025-05-14 01:19:25 UTC
FEDORA-2025-1045fdae05 (DisplayCAL-3.9.16-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.