[Spacewalk-list] AttributeError: 'list' object has no attribute 'encode'

Bruce McAlister bruce.mcalister at blueface.com
Mon Jan 23 19:07:04 UTC 2017


Hi All,

I just updated 3 of my test CentOS 7 x64 systems to the "latest" package 
levels and I am now unable to perform any yum operations when the 
rhnplugin is enabled. I just wanted to check with the list if anyone 
else is experiencing this issue.

I am subscribed to the CentOS 7 spacewalk nightly client chennel, I'm 
guessing something may be amiss there. I am running spacewalk server 
version 2.5.

After running a "yum update", any subsequent yum operation with the 
rhnplugin enabled is aborted with the error listed below. Let me know if 
you need any further information to debug this further. Any 
tips/suggestions would be greatly appreciated.

---
# yum list installed
Loaded plugins: fastestmirror, rhnplugin
Traceback (most recent call last):
   File "/bin/yum", line 29, in <module>
     yummain.user_main(sys.argv[1:], exit_code=True)
   File "/usr/share/yum-cli/yummain.py", line 370, in user_main
     errcode = main(args)
   File "/usr/share/yum-cli/yummain.py", line 165, in main
     base.getOptionsConfig(args)
   File "/usr/share/yum-cli/cli.py", line 261, in getOptionsConfig
     self.conf
   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1078, 
in <lambda>
     conf = property(fget=lambda self: self._getConfig(),
   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 420, in 
_getConfig
     self.plugins.run('init')
   File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
     func(conduitcls(self, self.base, conf, **kwargs))
   File "/usr/share/yum-plugins/rhnplugin.py", line 121, in init_hook
     login_info = up2dateAuth.getLoginInfo(timeout=timeout)
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 229, in 
getLoginInfo
     login(timeout=timeout)
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 193, in login
     maybeUpdateVersion()
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 46, in 
maybeUpdateVersion
     systemVer = up2dateUtils.getVersion()
   File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 67, in 
getVersion
     os_release, version, release = _getOSVersionAndRelease()
   File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 42, in 
_getOSVersionAndRelease
     provides = dict(zip(sstr(h['providename']), 
sstr(h['provideversion'])))
   File "/usr/lib/python2.7/site-packages/rhn/i18n.py", line 60, in sstr
     return str(obj.encode('utf8', 'ignore'))
AttributeError: 'list' object has no attribute 'encode'
---

----
# package-cleanup --dupes
Loaded plugins: fastestmirror, rhnplugin
Traceback (most recent call last):
   File "/bin/package-cleanup", line 400, in <module>
     util = PackageCleanup()
   File "/bin/package-cleanup", line 60, in __init__
     self.main()
   File "/bin/package-cleanup", line 290, in main
     opts = self.doUtilConfigSetup()
   File "/usr/share/yum-cli/utils.py", line 322, in doUtilConfigSetup
     self.conf
   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1078, 
in <lambda>
     conf = property(fget=lambda self: self._getConfig(),
   File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 420, in 
_getConfig
     self.plugins.run('init')
   File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
     func(conduitcls(self, self.base, conf, **kwargs))
   File "/usr/share/yum-plugins/rhnplugin.py", line 121, in init_hook
     login_info = up2dateAuth.getLoginInfo(timeout=timeout)
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 229, in 
getLoginInfo
     login(timeout=timeout)
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 193, in login
     maybeUpdateVersion()
   File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 46, in 
maybeUpdateVersion
     systemVer = up2dateUtils.getVersion()
   File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 67, in 
getVersion
     os_release, version, release = _getOSVersionAndRelease()
   File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 42, in 
_getOSVersionAndRelease
     provides = dict(zip(sstr(h['providename']), 
sstr(h['provideversion'])))
   File "/usr/lib/python2.7/site-packages/rhn/i18n.py", line 60, in sstr
     return str(obj.encode('utf8', 'ignore'))
AttributeError: 'list' object has no attribute 'encode'
----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20170123/6154db28/attachment.htm>


More information about the Spacewalk-list mailing list