View Issue Details

IDProjectCategoryView StatusLast Update
0013660Buildsyscentpkgpublic2017-10-17 12:36
ReporterSandro Bonazzola 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0013660: yum - UnicodeEncodeError on Could not retrieve mirrorlist

  File "/usr/lib/python2.7/site-packages/yum/", line 3455, in searchPackageProvides
    where = self.returnPackagesByDep(arg)
  File "/usr/lib/python2.7/site-packages/yum/", line 4281, in returnPackagesByDep
    return self.pkgSack.searchProvides(depstring)
  File "/usr/lib/python2.7/site-packages/yum/", line 1074, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/", line 778, in _getSacks
  File "/usr/lib/python2.7/site-packages/yum/", line 347, in populateSack
  File "/usr/lib/python2.7/site-packages/yum/", line 158, in doSetup'postreposetup')
  File "/usr/lib/python2.7/site-packages/yum/", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/", line 197, in postreposetup_hook
    if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
  File "/usr/lib/python2.7/site-packages/yum/", line 876, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.7/site-packages/yum/", line 873, in _geturls
  File "/usr/lib/python2.7/site-packages/yum/", line 822, in _baseurlSetup
  File "/usr/lib/python2.7/site-packages/yum/", line 1974, in _getMirrorList
    print "Could not retrieve mirrorlist %s error was\n%s: %s" % (url, e.args[0], misc.to_unicode(e.args[1]))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 180: ordinal not in range(128)

I was using Italian as system language and accessing directly yum API for oVirt/RHV OTOPI project.

OTOPI detected:
2017-08-11 13:18:21,151+0200 DEBUG otopi.context context.dumpEnvironment:771 ENV BASE/exceptionInfo=list:'[(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Could not retrieve mirrorlist htt
p:// error was\n14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: La rete non \xe8 raggiungibile"', 180, 181, 'ordinal not in range(128)'), <
traceback object at 0x111fb00>)]'

# rpm -qv yum

TagsNo tags attached.




2017-08-17 18:31

developer   ~0029890

Is this supposed to be filed against centpkg?
Sandro Bonazzola

Sandro Bonazzola

2017-08-21 07:25

reporter   ~0029914

No, it's a yum bug. looks like it uses curl and has issues with IPv6 addresses returned by
The parser raises an error with ordinal not in range.
I have reproduced this on CentOS not on RHEL so opened the bug here.


2017-08-23 17:49

manager   ~0029940

Interesting, but I'm afraid this can't be fixed from the CentOS side of things. yum is trying to print "La rete non รจ raggiungibile" but fails at doing that. You can probably reproduce this on RHEL as well if you point some repository to an IPv6-only address, such as, on a RHEL host that has only an IPv4 address and with Italian locale.

(that address not a repository, but will probably be OK for this testing purpose)
Sandro Bonazzola

Sandro Bonazzola

2017-10-17 05:34

reporter   ~0030382

Ok, I think this can be closed then.

Issue History

Date Modified Username Field Change
2017-08-11 11:25 Sandro Bonazzola New Issue
2017-08-17 18:31 bstinson Note Added: 0029890
2017-08-21 07:25 Sandro Bonazzola Note Added: 0029914
2017-08-23 17:49 avij Note Added: 0029940
2017-10-17 05:34 Sandro Bonazzola Note Added: 0030382
2017-10-17 12:36 JohnnyHughes Status new => closed
2017-10-17 12:36 JohnnyHughes Resolution open => fixed