Solved: yum says TypeError: coercing to Unicode: need string or buffer, list found

You to run a simple yum update and yum gives you a traceback full of python info. Huh?

up2dateErrors.py212__init__TypeError coercing to Unicode need string or buffer, list found

Traceback (most recent call last)
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 105, in main
  File "/usr/share/yum-cli/cli.py", line 228, in getOptionsConfig
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 901, in <lambda>
    conf = property(fget=lambda self self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 358, in _getConfig
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 114, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 219, in getLoginInfo
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 68, in __call__
    raise up2dateErrors.SSLCertificateVerifyFailedError()
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 212, in __init__
    f = open(certFile, "r")
TypeError coercing to Unicode need string or buffer, list found

Local variables in innermost frame
up2dateConfig <up2date_client.config.Config instance at 0x2983a70>

What is happening? Has the user been messing around with the python installation and broke it? Maybe there's something wrong with the certificates! After all, it does say SSLCertificateVerifyFailedError() in the abrt output.

No, it's far simpler. Just check your system time by running date. In my case, the local time had been erroneously set to a year earlier. (Note my subtle use of the passive voice here.)

After time was set to a sane value (and ntpd was set to start at boot with chkconfig ntpd on), all was well.

Subscribe to RSS - yum