Bug 1259747 - PyGIWarning: GnomeKeyring was imported without specifying a version first.
Summary: PyGIWarning: GnomeKeyring was imported without specifying a version first.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-keyring
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ratnadeep Debnath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1271641 (view as bug list)
Depends On:
Blocks: 1487547 1494144 1494148
TreeView+ depends on / blocked
 
Reported: 2015-09-03 13:22 UTC by Karel Volný
Modified: 2017-09-21 14:31 UTC (History)
28 users (show)

Fixed In Version: python-keyring-5.0-5.fc24 python-keyring-5.0-5.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1487547 (view as bug list)
Environment:
Last Closed: 2016-10-10 21:49:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch as described in comment #2 (650 bytes, patch)
2016-09-30 21:28 UTC, Fritz Elfert
no flags Details | Diff
Diff of the spec file for including the patch (938 bytes, patch)
2016-09-30 21:31 UTC, Fritz Elfert
no flags Details | Diff

Description Karel Volný 2015-09-03 13:22:25 UTC
Description of problem:
Trying to use some tools, I'm getting an error from novaclient.

Version-Release number of selected component (if applicable):
python-novaclient-2.23.0-2.fc23.noarch

How reproducible:
always

Steps to Reproduce:
1. (setup variables)
2. nova list

Actual results:
/usr/lib/python2.7/site-packages/keyring/backends/Gnome.py:6: PyGIWarning: GnomeKeyring was imported without specifying a version first. Use gi.require_version('GnomeKeyring', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GnomeKeyring
...

Expected results:
(no such error)

Additional info:

Comment 1 Lars Kellogg-Stedman 2015-09-28 13:37:34 UTC
This means that every single OpenStack client invocation starts with this particular error message.

$ openstack catalog list > /dev/null
/usr/lib/python2.7/site-packages/keyring/backends/Gnome.py:6: PyGIWarning: GnomeKeyring was imported without specifying a version first. Use gi.require_version('GnomeKeyring', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GnomeKeyring

$ glance image-list > /dev/null
/usr/lib/python2.7/site-packages/keyring/backends/Gnome.py:6: PyGIWarning: GnomeKeyring was imported without specifying a version first. Use gi.require_version('GnomeKeyring', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GnomeKeyring

Besides being annoying I know that in the past this sort of unexpected output has confused some of the openstack puppet modules.

Comment 2 Lars Kellogg-Stedman 2015-09-28 14:31:16 UTC
You can "fix" (?) this problem by modifying the top of /usr/lib/python2.7/site-packages/keyring/backends/Gnome.py, replacing this:

    try:
        from gi import Repository
        if Repository.get_default().enumerate_versions('GnomeKeyring'):
            from gi.repository import GnomeKeyring
    except ImportError:
        pass

With this:

    try:
        from gi import Repository, require_version
        if Repository.get_default().enumerate_versions('GnomeKeyring'):
            require_version('GnomeKeyring', '1.0')
            from gi.repository import GnomeKeyring
    except ImportError:
        pass

Comment 3 Justin Holmes 2015-11-07 02:28:10 UTC
Can confirm that this "fix" works for me on fedora 23 as well. Any chance of getting this packaged into a bug fix?

Comment 4 Ilkka Tengvall 2015-11-12 07:48:22 UTC
"me too", works in fedora 23.

Comment 5 Donny Davis 2015-11-16 22:30:57 UTC
+1 works here too

Comment 6 Juan Jimenez 2015-11-26 18:14:01 UTC
Another +1

Comment 7 Christer 2015-12-03 15:49:36 UTC
Another +1 for fixing this Fedora 23

Comment 8 wes hayutin 2016-01-08 15:28:45 UTC
+1 for a f23 fix

Comment 9 John Dennis 2016-01-08 22:20:34 UTC
Why isn't this fixed?

It was first reported 4 months ago, the fix is trivial and well known. It's very annoying. Please get a fix pushed out into stable ASAP. Don't forget about rawhide either.


Note: same bug has been filed in a few other places:

http://permalink.gmane.org/gmane.linux.debian.devel.python.modules/25136
https://bugs.launchpad.net/python-keystoneclient/+bug/1517907

Comment 10 Lars Kellogg-Stedman 2016-01-08 22:43:45 UTC
Please try to keep the contents of bug reports polite.  Fedora is a volunteer project, and folks are kind enough to donate their time to help maintain packages.

In this case, one reason it hasn't been fixed is that it was initially filed against the wrong component, so the package maintainer wasn't even aware of it until earlier today when moved it to python-keyring.

Comment 11 John Dennis 2016-01-08 22:50:34 UTC
My apologies for not seeing it was only assigned today.

Comment 12 Eduardo 2016-01-13 16:47:02 UTC
just would like to share that the fix reported by  Lars Kellogg-Stedman at 2015-09-28 10:31:16 EDT also worked in my F23 with latest codes (updated at Jan 13 2016)

Comment 13 Alan Pevec 2016-01-14 21:43:25 UTC
*** Bug 1271641 has been marked as a duplicate of this bug. ***

Comment 14 Alan Pevec 2016-01-14 21:45:00 UTC

*** This bug has been marked as a duplicate of bug 1195985 ***

Comment 15 Ralph Bean 2016-03-14 17:26:50 UTC
Alan, can you give us some explanation about how this bug is a duplicate of #1195985?

We got some feedback today that this bug is causing some performance issues in ansible:  http://willthames.github.io/2016/03/12/ansible-slow-startup-on-fedora-23.html

Comment 16 Jan Vlug 2016-05-02 09:25:01 UTC
I would also like to see a confirmation that this is a duplicate of bug 1271641, because the "fix" of comment 2 indeed works.

Couldn't this issue be fixed separately from bug 1271641?

Please package it in a bug fix for Fedora 23.

Comment 17 Jan Vlug 2016-06-22 14:30:55 UTC
Please re-open this bug as I still get this error when using hg in Fedora 24.

Comment 18 Kevin Fenzi 2016-06-22 15:56:29 UTC
Reopening. Maintainers: Can we take another look here please...

Comment 19 Charles Butterfield 2016-09-04 18:30:06 UTC
Many thanks to  Lars Kellogg-Stedman, his fix saved my bacon too.  Not sure why there is so much resistance to fixing this.  Perhaps the maintainers are using some other version and don't see these problem every time they execute a command, but for the rest of us its a royal pain.

Comment 20 Nick Cross 2016-09-10 16:54:40 UTC
I am seeing this error message in .xsession-errors on F24 as well

Comment 21 Fritz Elfert 2016-09-30 21:02:48 UTC
Still in F24. (tested using python-novaclient-3.3.1-1.fc24.noarch. Shows the same behavior)

Fix as suggested in comment #2 still applies nicely.
So: what's the holdup?
Come on guys, PLEASE fix this already. (Or at least respond with a reason *why* you don't fix this).

Comment 22 Fritz Elfert 2016-09-30 21:28:13 UTC
Created attachment 1206372 [details]
patch as described in comment #2

Comment 23 Fritz Elfert 2016-09-30 21:31:27 UTC
Created attachment 1206373 [details]
Diff of the spec file for including the patch

Hopefully, providing the patch and the diff for the spec file speed up fixing this!

Comment 24 Kevin Fenzi 2016-10-02 21:08:07 UTC
So, I looked into this a bit... seems that rawhide and f25 got an update to this package to version 9.0. 

This bug was actually fixed upstream in version 5.5, but f23 and f24 have 5.0. 

I'm not the maintainer here, but I'm going to push the fix anyhow. :) 

If folks could please test and karma the updates that would be great.

Comment 25 Fedora Update System 2016-10-03 07:19:43 UTC
python-keyring-5.0-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0e264302f4

Comment 26 Fedora Update System 2016-10-03 07:22:27 UTC
python-keyring-5.0-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-68185dfc26

Comment 27 Fedora Update System 2016-10-10 21:49:23 UTC
python-keyring-5.0-5.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2016-10-11 01:17:51 UTC
python-keyring-5.0-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 29 xinhua.bao 2017-08-30 05:19:58 UTC
I updated the python-keyring to fc24.                
[stack@localhost ~]$ yum list python-keyring
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Repo rhel-7-server-extras-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/711629419700828312-key.pem
Repo rhel-7-server-rh-common-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/711629419700828312-key.pem
Repo rhel-7-server-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/711629419700828312-key.pem
Repo rhel-7-server-openstack-8-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/711629419700828312-key.pem
Repo rhel-7-server-openstack-8-director-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/711629419700828312-key.pem
Installed Packages
python-keyring.noarch                                                               5.0-5.fc24                                                                installed
[stack@localhost ~]$ 
I still met problem.
Warning: /Stage[main]/Heat::Deps/Anchor[heat::service::end]: Skipping because of failed dependencies
Notice: Finished catalog run in 24.60 seconds
+ rc=6
+ set -e
+ echo 'puppet apply exited with exit code 6'
puppet apply exited with exit code 6
+ '[' 6 '!=' 2 -a 6 '!=' 0 ']'
+ exit 6
[2017-08-30 11:22:19,092] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/configure.d']' returned non-zero exit status 6]

[2017-08-30 11:22:19,093] (os-refresh-config) [ERROR] Aborting...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 815, in install
    _run_orc(instack_env)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 699, in _run_orc
    _run_live_command(args, instack_env, 'os-refresh-config')
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 370, in _run_live_command
    raise RuntimeError('%s failed. See log for details.' % name)
RuntimeError: os-refresh-config failed. See log for details.
Command 'instack-install-undercloud' returned non-zero exit status 1


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