RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1507065 - PyGIWarning while running system-config-printer
Summary: PyGIWarning while running system-config-printer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: system-config-printer
Version: 7.4
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Dohnal
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 1534569 1630905 1709724 1716960
TreeView+ depends on / blocked
 
Reported: 2017-10-27 14:50 UTC by Dan E
Modified: 2023-09-07 18:59 UTC (History)
8 users (show)

Fixed In Version: system-config-printer-1.5.11-22.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:43:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
path to avoid pigiwarning (649 bytes, patch)
2018-03-19 14:33 UTC, Petr Sklenar
no flags Details | Diff
Complete patch (994 bytes, patch)
2019-07-24 05:59 UTC, Zdenek Dohnal
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3242091 0 None None None 2017-11-15 14:31:44 UTC
Red Hat Product Errata RHBA-2020:1044 0 None None None 2020-03-31 19:43:23 UTC

Description Dan E 2017-10-27 14:50:53 UTC
Description of problem:
While trying to setup a printer. I use the system-config-printer command.
Until about three weeks ago, I started seeing this issue:

$ system-config-printer
/usr/share/system-config-printer/system-config-printer.py:30: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkPixbuf
Floating exception
$ 

Version-Release number of selected component (if applicable):
$ yum list system-config-printer
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Installed Packages
system-config-printer.x86_64                            1.4.1-19.el7                            @prod-base
$ 

How reproducible:
Type the command: system-config-printer

Steps to Reproduce:
1. type the command: system-config-printer
2.
3.

Actual results:


Expected results:


Additional info:
I noticed this or a very similar issue has been fixed in Fedora 25. I'd like a to know if a fix can be implemented for RH 7.4 +

https://bugzilla.redhat.com/show_bug.cgi?id=1354606

It’s a Fedora fix, but somehow it was tagged as a Duplicate (of a red hat issue) here:

https://bugzilla.redhat.com/show_bug.cgi?id=1383869

Comment 3 Ajinkya Patil 2017-12-04 19:36:20 UTC
Greetings,

Is there any workaround for this?
When can we expect a fix?

Comment 21 Zdenek Dohnal 2018-01-22 09:15:04 UTC
system-config-abrt behaves the same like system-config-printer (its start ends with floating point exception), so the issue (bug or only misconfiguration) is clearly not with s-c-p.

Comment 23 Petr Sklenar 2018-03-19 14:33:07 UTC
Created attachment 1409887 [details]
path to avoid pigiwarning

there is patch fixing warnings comes from gdk. It was tested on rhel75 on x86_64

Please don't miss this patch with crash of ssh - It is different issue, which should be tracked in different bugzilla.

Comment 24 Steve Bonds 2018-10-31 20:12:03 UTC
Here's a quick fix by including the newly required extra gi.require_version lines:

# diff --context /usr/share/system-config-printer/system-config-printer.py.orig /usr/share/system-config-printer/system-config-printer.py
*** /usr/share/system-config-printer/system-config-printer.py.orig      2018-10-31 12:55:48.161224451 -0700
--- /usr/share/system-config-printer/system-config-printer.py   2018-10-31 12:57:46.330998160 -0700
***************
*** 28,35 ****
--- 28,37 ----
  import thread
  import dbus
  import gi
+ gi.require_version('GdkPixbuf', '2.0')
  from gi.repository import GdkPixbuf
  try:
+     gi.require_version('Gdk', '3.0')
      from gi.repository import Gdk
      gi.require_version('Gtk', '3.0')
      from gi.repository import Gtk

# diff --context /usr/share/system-config-printer/jobviewer.py.orig /usr/share/system-config-printer/jobviewer.py
*** /usr/share/system-config-printer/jobviewer.py.orig  2018-10-31 13:07:43.084853905 -0700
--- /usr/share/system-config-printer/jobviewer.py       2018-10-31 13:09:33.894641430 -0700
***************
*** 24,29 ****
--- 24,31 ----
  import dbus
  import dbus.glib
  import dbus.service
+ import gi
+ gi.require_version('Notify', '0.7')
  from gi.repository import Notify
  import gettext
  from gi.repository import GLib
***************
*** 51,56 ****
--- 53,59 ----
  cups.require("1.9.47")

  try:
+     gi.require_version('GnomeKeyring', '1.0')
      from gi.repository import GnomeKeyring
      USE_KEYRING=True
  except ImportError:

Comment 25 Zdenek Dohnal 2018-11-05 09:54:26 UTC
Hi Steve,

thank you for the patch! Actually Petr already created the patch for PyGi warnings which were shown in Dan's case, but I can verify other warnings show up and your patch fixes them. Thank you!

Comment 30 Steve Bonds 2019-07-17 13:26:42 UTC
I see that a TestCaseNeeded flag was added. It seems like we have a fairly simple manual bug-reproduction process. What additional info is needed to create a test case?

Comment 31 Tomáš Hozza 2019-07-17 13:41:19 UTC
(In reply to Steve Bonds from comment #30)
> I see that a TestCaseNeeded flag was added. It seems like we have a fairly
> simple manual bug-reproduction process. What additional info is needed to
> create a test case?

This means that automated / manual test case in our internal tooling needs to be created as part of fixing this bug.

Comment 32 Steve Bonds 2019-07-17 15:20:40 UTC
Got it. Since that is "internal tooling" there doesn't seem to be much people from the world at large can do from an Open Source point of view. Is that correct?

Comment 34 Zdenek Dohnal 2019-07-24 05:59:28 UTC
Created attachment 1593057 [details]
Complete patch

Complete patch.

Comment 47 errata-xmlrpc 2020-03-31 19:43:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1044


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