Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Import fails due to incorrect use of GObject
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
threading.Thread.run(self, *args, **kwargs)
Please make your choice from above: File "/usr/lib64/python2.7/threading.py", line 764, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes/source.py", line 81, in _initialize
threadMgr.wait(THREAD_PAYLOAD)
File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 112, in wait
self.raise_if_error(name)
File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
threading.Thread.run(self, *args, **kwargs)
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/__init__.py", line 1256, in _runThread
payload.updateBaseRepo(fallback=fallback, checkmount=checkmount)
File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 141, in inner_method
ret = method(yum_payload, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 524, in updateBaseRepo
self.reset(root=root, releasever=releasever)
File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 195, in reset
self._resetYum(root=root, releasever=releasever)
File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 220, in _resetYum
for repo in self._yum.repos.listEnabled():
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in <lambda>
repos = property(fget=lambda self: self._getRepos(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 692, in _getRepos
self.conf # touch the config class first
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1083, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 401, in _getConfig
self.plugins.run('postconfig')
File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/subscription-manager.py", line 131, in postconfig_hook
from subscription_manager.injectioninit import init_dep_injection
File "/usr/share/rhsm/subscription_manager/injectioninit.py", line 22, in <module>
from subscription_manager.cert_sorter import CertSorter
File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 27, in <module>
from subscription_manager import file_monitor
File "/usr/share/rhsm/subscription_manager/file_monitor.py", line 58, in <module>
class Monitor(gobject.GObject):
File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 62, in __getattr__
raise AttributeError(_static_binding_error)
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://bugzilla.gnome.org/show_bug.cgi?id=709183
I hit this while running anaconda --dirinstall --text from a RHEL 7.2 minimal install.
the yum 'subscription-manager' plugin uses code from subscription-manager, that currently uses the gtk2/pygtk bindings, which conflict with use of gtk3/pygobject/gi used in anaconda.
Simplest workaround is to disable the 'subscription-manager' yum plugin for that case. It's not really meant to be from anaconda (anaconda from an installer image doesn't include it).
There is a subman branch under review now that ports it to gtk3/pygobject/gi, which should also resolve the error.
Disabling subscription manager works fine for me, but customers will hit this when they use anaconda --dirinstall, anaconda --image or livemedia-creator in no-virt mode (which runs anaconda directly) so a fix is a good idea.
master branch of subscription-manager now supports gobject/gtk2 and 3. The default for RHEL5->RHEL7.1 will be gtk/gobject 2, while RHEL will default to gtk3 for 7.2 and later.
Also, the gobject based file_monitor.py module that was causing the issues here is no longer gobject based. So currently, the yum plugins mostly avoid use of gobject modules (though the dbus default mainloop can be invoked, but that seems to be okay).
(change was over a range of commits, but 3c43eb843cf035246e3f2281c6bdcd9c2044877d is the main merge into master, and 1.15.3-1 the first build with the change)
Brian,
Since I am not an anaconda expert, please retest your anaconda scenario with the latest nightly subscription-manager (should be 1.15.3-1 or newer) and verify Adrian's fix.
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://rhn.redhat.com/errata/RHBA-2015-2122.html
Description of problem: Import fails due to incorrect use of GObject Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run threading.Thread.run(self, *args, **kwargs) Please make your choice from above: File "/usr/lib64/python2.7/threading.py", line 764, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/tui/spokes/source.py", line 81, in _initialize threadMgr.wait(THREAD_PAYLOAD) File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 112, in wait self.raise_if_error(name) File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run threading.Thread.run(self, *args, **kwargs) File "/usr/lib64/python2.7/threading.py", line 764, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/__init__.py", line 1256, in _runThread payload.updateBaseRepo(fallback=fallback, checkmount=checkmount) File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 141, in inner_method ret = method(yum_payload, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 524, in updateBaseRepo self.reset(root=root, releasever=releasever) File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 195, in reset self._resetYum(root=root, releasever=releasever) File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 220, in _resetYum for repo in self._yum.repos.listEnabled(): File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in <lambda> repos = property(fget=lambda self: self._getRepos(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 692, in _getRepos self.conf # touch the config class first File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1083, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 401, in _getConfig self.plugins.run('postconfig') File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/subscription-manager.py", line 131, in postconfig_hook from subscription_manager.injectioninit import init_dep_injection File "/usr/share/rhsm/subscription_manager/injectioninit.py", line 22, in <module> from subscription_manager.cert_sorter import CertSorter File "/usr/share/rhsm/subscription_manager/cert_sorter.py", line 27, in <module> from subscription_manager import file_monitor File "/usr/share/rhsm/subscription_manager/file_monitor.py", line 58, in <module> class Monitor(gobject.GObject): File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 62, in __getattr__ raise AttributeError(_static_binding_error) 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://bugzilla.gnome.org/show_bug.cgi?id=709183 I hit this while running anaconda --dirinstall --text from a RHEL 7.2 minimal install.