[SRU] openstack command raises exception referencing gi.repository and gnome bug 709183
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Ubuntu Cloud Archive |
Undecided
|
Unassigned | ||
| cmd2 (Ubuntu) |
High
|
Unassigned | ||
| python-openstackclient (Ubuntu) |
Low
|
Unassigned | ||
| python-pyperclip (Ubuntu) |
High
|
Unassigned | ||
| Artful |
High
|
Unassigned |
Bug Description
$ openstack
Exception raised: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https:/
$ sstack openstack --debug
START with options: [u'--debug']
options: Namespace(
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_
defaults: {u'auth_type': 'password', u'status': u'active', u'compute_
cloud cfg: {'auth_type': 'password', 'beta_command': False, u'compute_
compute API version 2, cmd group openstack.
network API version 2, cmd group openstack.
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.
object_store API version 1, cmd group openstack.
neutronclient API version 2, cmd group openstack.
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_
Traceback (most recent call last):
File "/usr/lib/
ret_val = super(OpenStack
File "/usr/lib/
result = self.interact()
File "/usr/lib/
ret_value = super(OpenStack
File "/usr/lib/
from .interactive import InteractiveApp
File "/usr/lib/
import cmd2
File "/usr/lib/
_ = pyperclip.paste()
File "/usr/lib/
clipboardCo
File "/usr/lib/
raise AttributeError(
AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https:/
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: python-
ProcVersionSign
Uname: Linux 4.13.0-12-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 10 10:58:55 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-07-23 (810 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150722.1)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: python-
UpgradeStatus: No upgrade log present (probably fresh install)
Scott Moser (smoser) wrote : | #2 |
Corey Bryant (corey.bryant) wrote : | #3 |
This looks to be very similar to: https:/
Corey Bryant (corey.bryant) wrote : | #4 |
Here's how the code flows to python-keyring where the conflicting code appears to be:
openstackclient
from openstackclient
openstackclient
# Get list of base plugin modules
PLUGIN_MODULES = get_plugin_modules(
)
^ loops through and imports the following modules from setup.cfg
openstack.
compute = openstackclient
identity = openstackclient
image = openstackclient
network = openstackclient
object_store = openstackclient
volume = openstackclient
openstackclient
from keystoneclient.v2_0 import client as identity_client_v2
keystoneclient/
from keystoneclient import httpclient
keystoneclient/
import keyring
keyring/
logger = logging.
(move this line ^ to bottom of file and issue goes away)
Corey Bryant (corey.bryant) wrote : | #5 |
I'm not sure that the logging.
This bug has the reasoning behind why the AttributeError exception is thrown: https:/
Corey Bryant (corey.bryant) wrote : | #6 |
This can be reproduced with the following python script:
#!/usr/bin/env python
import keyring
import pyperclip
pyperclip.paste()
Corey Bryant (corey.bryant) wrote : | #7 |
Narrowing down a bit more, this can also be reproduced with the following python script:
#!/usr/bin/env python
import gtk
import gi
The 2 lines of code that appear to be conflicting are:
1) /usr/lib/
import gi
2) /usr/lib/
import gtk
And if I understand correctly from https:/
From http://
So it seems to me that pyperclip in artful needs to move to GTK+3.
Changed in python-pyperclip (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Corey Bryant (corey.bryant) wrote : | #8 |
Edit to previous comment:
And if I understand correctly from https:/
Corey Bryant (corey.bryant) wrote : | #9 |
Another edit:
And if I understand correctly from https:/
Corey Bryant (corey.bryant) wrote : | #10 |
According to https:/
I've opened https:/
Corey Bryant (corey.bryant) wrote : | #11 |
Checking to see if we can work around this via a change to keyring: https:/
Corey Bryant (corey.bryant) wrote : | #12 |
The only reason I've marked python-
I've not received any action on the upstream pyperclip bug, so I submitted patches this morning to move pyperclip and cmd2 to GTL+ version 3:
https:/
https:/
I'd like to get a quick upstream review on those before I backport to Ubuntu.
Changed in cmd2 (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in python-openstackclient (Ubuntu): | |
importance: | Undecided → Low |
Corey Bryant (corey.bryant) wrote : | #13 |
s/GTL/GDK
Corey Bryant (corey.bryant) wrote : | #14 |
sigh.. s/GDK/GTK
Corey Bryant (corey.bryant) wrote : | #15 |
It seems this issue has gone away in artful but still exists in bionic.
Corey Bryant (corey.bryant) wrote : | #16 |
I've uploaded patched cmd2 and python-pyperclip packages to Bionic to fix this issue. If you're still seeing this on any other releases please let me know.
Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package python-pyperclip - 1.5.32-1ubuntu1
---------------
python-pyperclip (1.5.32-1ubuntu1) bionic; urgency=medium
* d/p/move-
-- Corey Bryant <email address hidden> Tue, 19 Dec 2017 16:25:22 -0500
Changed in python-pyperclip (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in cmd2 (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in python-openstackclient (Ubuntu): | |
status: | Confirmed → Invalid |
Corey Bryant (corey.bryant) wrote : | #18 |
I just had a report that this is still occurring in Artful. While I can't recreate on a new kvm instance, I want to open this back up for Artful and possibly provide a fix or get to the bottom of why I'm not seeing it.
Launchpad Janitor (janitor) wrote : | #19 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in cmd2 (Ubuntu Artful): | |
status: | New → Confirmed |
Changed in python-openstackclient (Ubuntu Artful): | |
status: | New → Confirmed |
Changed in python-pyperclip (Ubuntu Artful): | |
status: | New → Confirmed |
Conrad Rockenhaus (1-conrad) wrote : | #22 |
I can confirm that this issue is still occurring in Artful. Use of the client from the command line works just fine, but any attempt to use it as an interactive shell fails with this error.
Scott Moser (smoser) wrote : | #23 |
Conrad,
The bug is definitely still present in Artful. Fixing it in Artful (a stable release) is what is known as a Stable Release Update [1]. I can verify I do not see the problem with just 'openstack' on bionic.
$ dpkg -S $(readlink -f `which openstack`)
python3-
$ dpkg-query --show python3-
python3-
$ openstack
(openstack)
So that seems fixed in bionic (and will be fixed in 18.04).
Note that just in this testing, I found bug 1751822.
no longer affects: | python-openstackclient (Ubuntu Artful) |
no longer affects: | cmd2 (Ubuntu Artful) |
no longer affects: | cloud-archive |
Corey Bryant (corey.bryant) wrote : | #24 |
This error doesn't surface on the Pike cloud-archive, but I've added it as the Artful version will be backported to Pike and will need regression testing.
Changed in cloud-archive: | |
status: | New → Fix Released |
Corey Bryant (corey.bryant) wrote : | #25 |
I've uploaded a patched version of python-pyperclip to the Artful queue where it is awaiting SRU team review: https:/
Changed in python-pyperclip (Ubuntu Artful): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Corey Bryant (corey.bryant) wrote : | #26 |
[Impact]
The openstack CLI interactive shell is unusable. More details in bug description above.
[Test Case]
Install python-
$ openstack
Exception raised: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https:/
[Regression Potential]
A similar fix landed in bionic on Jan 2nd and hasn't had any issues so far.
[Discussion]
summary: |
- openstack command raises exception referencing gi.repository and gnome - bug 709183 + [SRU] openstack command raises exception referencing gi.repository and + gnome bug 709183 |
Hello Scott, or anyone else affected,
Accepted python-pyperclip into artful-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-
Further information regarding the verification process can be found at https:/
Changed in python-pyperclip (Ubuntu Artful): | |
status: | Triaged → Fix Committed |
tags: | added: verification-needed verification-needed-artful |
Corey Bryant (corey.bryant) wrote : | #28 |
It turns out we don't carry pyperclip or cmd2 in the pike cloud archive so I'm dropping that target from this bug.
no longer affects: | cloud-archive/pike |
no longer affects: | cloud-archive/pike |
note that 'openstack server list' does work, its just when trying to start the interactive shell it fails.