Bug 1121177

Summary: [abrt] system-config-printer: system-config-printer.py:57:<module>:ImportError: No module named 'cups'
Product: [Fedora] Fedora Reporter: Bill Gianopoulos <wgianopoulos>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 21CC: caf, jfrieben, jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/2c7240cc24fe00508d0351321a3adbafe803bd0f
Whiteboard: abrt_hash:1953c30cbe37e5b2e5943b98e0c42dfdcc3b2687
Fixed In Version: system-config-printer-1.5.0-3.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-21 09:53:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Bill Gianopoulos 2014-07-18 14:46:11 UTC
Description of problem:
Tried to launch system-config-printer.

Version-Release number of selected component:
system-config-printer-1.5.0-1.fc22

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python3 /usr/share/system-config-printer/system-config-printer.py
executable:     /usr/share/system-config-printer/system-config-printer.py
kernel:         3.16.0-0.rc5.git1.1.fc22.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
system-config-printer.py:57:<module>:ImportError: No module named 'cups'

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 57, in <module>
    import cups
ImportError: No module named 'cups'

Local variables in innermost frame:
dbus: <module 'dbus' from '/usr/lib/python3.4/site-packages/dbus/__init__.py'>
__doc__: None
Polkit: <gi.module.DynamicModule 'Polkit' from '/usr/lib64/girepository-1.0/Polkit-1.0.typelib'>
__file__: '/usr/share/system-config-printer/system-config-printer.py'
re: <module 're' from '/usr/lib64/python3.4/re.py'>
time: <module 'time' from '/usr/lib64/python3.4/lib-dynload/time.cpython-34m.so'>
GdkPixbuf: <gi.module.DynamicModule 'GdkPixbuf' from '/usr/lib64/girepository-1.0/GdkPixbuf-2.0.typelib'>
__loader__: <_frozen_importlib.SourceFileLoader object at 0x7feb4c31ab70>
__builtins__: <module 'builtins' (built-in)>
__spec__: None
__package__: None
_thread: <module '_thread' (built-in)>
sys: <module 'sys' (built-in)>
__cached__: None
show_help: <function show_help at 0x7feb4c26c2f0>
Gdk: <gi.module.DynamicModule 'Gdk' from '/usr/lib64/girepository-1.0/Gdk-3.0.typelib'>
os: <module 'os' from '/usr/lib64/python3.4/os.py'>
__name__: '__main__'
config: <module 'config' from '/usr/share/system-config-printer/config.py'>
Gtk: <gi.module.DynamicModule 'Gtk' from '/usr/lib64/girepository-1.0/Gtk-3.0.typelib'>

Comment 1 Bill Gianopoulos 2014-07-18 14:46:13 UTC
Created attachment 919108 [details]
File: backtrace

Comment 2 Bill Gianopoulos 2014-07-18 14:46:14 UTC
Created attachment 919109 [details]
File: environ

Comment 3 Bill Gianopoulos 2014-07-18 14:52:00 UTC
Perhaps this is caused by there not yet being an fc22 package for python-cups.

Comment 4 Tim Waugh 2014-07-18 22:54:35 UTC
I've built python-cups-1.9.67-1.fc22 in rawhide now. Let me know if it still has a problem starting.

Comment 5 Bill Gianopoulos 2014-07-19 12:23:47 UTC
(In reply to Tim Waugh from comment #4)
> I've built python-cups-1.9.67-1.fc22 in rawhide now. Let me know if it still
> has a problem starting.

Unfortunately that did not seem to make a difference.

[wag@rawhide-usb ~]$ system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 57, in <module>
    import cups
ImportError: No module named 'cups'
[wag@rawhide-usb ~]$ yum info python-cups
Loaded plugins: langpacks
Installed Packages
Name        : python-cups
Arch        : x86_64
Version     : 1.9.67
Release     : 1.fc22
Size        : 254 k
Repo        : installed
From repo   : /python-cups-1.9.67-1.fc22.x86_64
Summary     : Python bindings for CUPS
URL         : http://cyberelk.net/tim/software/pycups/
License     : GPLv2+
Description : This package provides Python bindings for CUPS API,
            : known as pycups. It was written for use with
            : system-config-printer, but can be put to other uses as well.

Comment 6 Joachim Frieben 2014-07-19 12:34:45 UTC
The same error message appears on a current Fedora 21 branched tree with installed packages
- python-cups-1.9.67-1.fc21
- system-config-printer-1.5.0-1.fc21

Comment 7 Bill Gianopoulos 2014-07-19 12:36:51 UTC
So would have been better had I noticed this sooner.

Comment 8 Joachim Frieben 2014-07-19 12:42:09 UTC
A downgrade to system-config-printer-1.4.5-3.fc21 solves the problem; in fact it does so also for the printing module of the gnome-control-center which failed when system-config-printer-1.5.0-1.fc21 was installed.

Comment 9 Tim Waugh 2014-07-19 19:33:22 UTC
Think it should be sorted out in system-config-printer-1.5.0-2.fc21.

Comment 10 Bill Gianopoulos 2014-07-19 23:32:10 UTC
I also had to install python3-pycurl.  That resulted in a working system-config-printer.

Comment 11 Joachim Frieben 2014-07-20 06:25:30 UTC
I also had to install python3-cups. That resulted in a working system-config-printer. Installing python3-pycurl had no effect. Thus the latest system-config-printer has to depend on python3-cups instead of on python-cups.

Comment 12 Bill Gianopoulos 2014-07-20 10:11:02 UTC
(In reply to Christoph Frieben from comment #11)
> I also had to install python3-cups. That resulted in a working
> system-config-printer. Installing python3-pycurl had no effect. Thus the
> latest system-config-printer has to depend on python3-cups instead of on
> python-cups.

That is what the change in version 1.5.0-2 fixed.

Comment 13 Tim Waugh 2014-07-20 10:48:40 UTC
*** Bug 1121354 has been marked as a duplicate of this bug. ***

Comment 14 Bill Gianopoulos 2014-07-20 18:30:49 UTC
So, to be clear here.  If system-config-printer has python3-pycurl added a a dependency, I think we are done here.

Comment 15 Tim Waugh 2014-07-20 19:00:49 UTC
Thanks. That dependency had been missing altogether.

Please try 1.5.0-3.

Comment 16 Bill Gianopoulos 2014-07-20 19:23:36 UTC
(In reply to Tim Waugh from comment #15)
> Thanks. That dependency had been missing altogether.
> 
> Please try 1.5.0-3.

OK with that is all works correctly on fc22 rawhide.

Comment 17 Tim Waugh 2014-07-21 09:53:22 UTC
Great. Thanks for reporting and for testing.