Bug 526040 - packages.py:413: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
Summary: packages.py:413: UnicodeWarning: Unicode unequal comparison failed to convert...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-28 13:31 UTC by Mads Kiilerich
Modified: 2014-01-21 23:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-14 15:00:05 UTC


Attachments (Terms of Use)

Description Mads Kiilerich 2009-09-28 13:31:02 UTC
Description of problem:

Trying a yum upgrade from F11 to rawhide I got:

/usr/lib/python2.6/site-packages/yum/packages.py:413: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if reqn != n:

It is caused by 
reqn=u'ttfonts-ja'
n='font(\xe3\x81\x95\xe3\x81\x96\xe3\x81\xaa\xe3\x81\xbf\xe3\x82\xb4\xe3\x82\xb7\xe3\x83\x83\xe3\x82\xaf)'


Version-Release number of selected component (if applicable):

yum-3.2.24-2.fc11.noarch

Comment 1 seth vidal 2009-10-12 21:59:03 UTC
does this happen every time and if you run:

yum clean all

does it go away?

Comment 2 Mads Kiilerich 2009-10-13 11:40:40 UTC
I see it every time on this machine (which won't be upgraded before the totem-upgrade has been solved ;-)). Cleaning makes no difference.

[root@localhost ~]# rm -rf /var/cache/yum/*
[root@localhost ~]# yum --enablerepo=rawhide upgrade
...
--> Processing Dependency: totem = 2.26.3 for package: totem-gstreamer-2.26.3-6.fc11.i586
/usr/lib/python2.6/site-packages/yum/packages.py:413: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if reqn != n:
--> Finished Dependency Resolution
totem-gstreamer-2.26.3-6.fc11.i586 from installed has depsolving problems
  --> Missing Dependency: totem = 2.26.3 is needed by package totem-gstreamer-2.26.3-6.fc11.i586 (installed)
--> Running transaction check
---> Package kernel-PAE.i686 0:2.6.29.6-217.fc11 set to be erased
---> Package kernel-PAE-devel.i686 0:2.6.29.6-213.fc11 set to be erased
--> Processing Dependency: totem = 2.26.3 for package: totem-gstreamer-2.26.3-6.fc11.i586
--> Finished Dependency Resolution
totem-gstreamer-2.26.3-6.fc11.i586 from installed has depsolving problems
  --> Missing Dependency: totem = 2.26.3 is needed by package totem-gstreamer-2.26.3-6.fc11.i586 (installed)
Error: Missing Dependency: totem = 2.26.3 is needed by package totem-gstreamer-2.26.3-6.fc11.i586 (installed)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
[root@localhost ~]# rpm -q yum rpm-libs
yum-3.2.24-2.fc11.noarch
rpm-libs-4.7.1-3.fc11.i586


Some thoughts:

Obviously there is disagreement about whether unicode or utf-8 strings should be used. Which of them are wrong?

Could it be related to
[root@localhost ~]# repoquery $(rpm -q --provides sazanami-mincho-fonts|grep -v =)
Traceback (most recent call last):
  File "/usr/bin/repoquery", line 853, in <module>
    main(sys.argv)
  File "/usr/bin/repoquery", line 849, in main
    repoq.runQuery(regexs)
  File "/usr/bin/repoquery", line 495, in runQuery
    pkgs = self.matchPkgs(items)
  File "/usr/bin/repoquery", line 475, in matchPkgs
    pkgs = self.returnPkgList(patterns=items)
  File "/usr/bin/repoquery", line 428, in returnPkgList
    pkgs = self.pkgSack.returnNewestByNameArch(**kwargs)
  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 476, in returnNewestByNameArch
    pkgs = calr("returnNewestByNameArch", naTup, patterns, ignore_case)
  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 551, in _computeAggregateListResult
    sackResult = apply(method, args)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 45, in newFunc
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 1390, in returnNewestByNameArch
    ignore_case)
  File "/usr/lib/python2.6/site-packages/yum/packageSack.py", line 870, in returnNewestByNameArch
    ignore_case=ignore_case)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 1562, in returnPackages
    pkgobjlist = self._buildPkgObjList(repoid, patterns, ignore_case)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 1533, in _buildPkgObjList
    return self.searchNames(patterns)
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 54, in newFunc
    raise Errors.RepoError, str(e)
yum.Errors.RepoError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

"yum install 'font(さざなみゴシック)'" should work, right?

Comment 3 Mads Kiilerich 2010-01-13 22:58:40 UTC
The system was upgraded to F12 by bruteforcing package problems, so it is no longer a urgent problem for me, and I'm not sure I can reproduce it.


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