Bug 864643 - TypeError: not all arguments converted during string formatting
TypeError: not all arguments converted during string formatting
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
18
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
: 867626 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 16:33 EDT by John Florian
Modified: 2013-12-30 09:21 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-30 09:21:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Florian 2012-10-09 16:33:41 EDT
Description of problem:

Got this while running livecd-creator:

Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 226, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 209, in main
    creator.install()
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 646, in install
    ayum.setup(yum_conf, self._instroot)
  File "/usr/lib/python2.7/site-packages/imgcreate/yuminst.py", line 103, in setup
    self.doTsSetup()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 129, in doTsSetup
    return self._getTs()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 137, in _getTs
    if not remove_only and self._tsInfo.pkgSack is None:
  File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 131, in <lambda>
    pkgSack = property(fget=lambda self: self._getPkgSack(),
  File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 128, in _getPkgSack
    self._pkgSack = self._pkgSackCtor()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 76, in __call__
    return self.ayum.pkgSack
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1009, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 779, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 348, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 184, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 275, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1399, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1585, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1581, in _getRepoXML
    self._loadRepoXML(text=self.ui_id)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1572, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1547, in _groupLoadRepoXML
    self._commonRetrieveDataMD(mdtypes)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1443, in _commonRetrieveDataMD
    self._revertOldRepoXML()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1209, in _revertOldRepoXML
    raise Errors.RepoError, "Can't download or revert repomd.xml for:" % self.ui_id
TypeError: not all arguments converted during string formatting

$ rpm -qf /usr/lib/python2.7/site-packages/yum/yumRepo.py
yum-3.4.3-45.fc18.noarch

I patched mine up with ...

--- /usr/lib/python2.7/site-packages/yum/yumRepo.py.orig        2012-10-09 16:31:36.053199598 -0400
+++ /usr/lib/python2.7/site-packages/yum/yumRepo.py     2012-10-09 16:31:38.717199861 -0400
@@ -1206,7 +1206,7 @@
         #  We still want the old data, so we don't download twice. So we
         # pretend everything is good until the revert.
         if not self.timestamp_check:
-            raise Errors.RepoError, "Can't download or revert repomd.xml for:" % self.ui_id
+            raise Errors.RepoError, "Can't download or revert repomd.xml for: %s" % self.ui_id
 
         if 'old_repo_XML' not in self._oldRepoMDData:
             self._oldRepoMDData = {}

... to discover my real problem:

yum.Errors.RepoError: Can't download or revert repomd.xml for: rpmfusion-free


Must be my local mirror is borked, but though you'd want to fix the above exception.
Comment 1 Zdeněk Pavlas 2012-10-10 03:26:55 EDT
Yes, that's a typo.  Thanks for the report.  Fixed upstream.  Checked rest of the commit that broke this and everything else was fine, it's just this bit:

-            raise Errors.RepoError, "Can't download or revert repomd.xml"
+            raise Errors.RepoError, "Can't download or revert repomd.xml for:" % self.ui_id
Comment 2 Zdeněk Pavlas 2012-10-18 09:07:03 EDT
*** Bug 867626 has been marked as a duplicate of this bug. ***
Comment 3 Fedora End Of Life 2013-12-21 04:05:17 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.