Ask Your Question
1

yum update: unicodewarning & sqlite3.ProgrammingError

asked 2013-10-06 01:57:00 -0500

dikkeduif gravatar image

updated 2014-09-17 13:30:10 -0500

mether gravatar image

I've been away from my machine for over a month, and when I try to update 'sudo yum update' I get the following error

   Transaction Summary
=======================================================================================================================================
Install    4 Packages (+  7 Dependent packages)
Upgrade  244 Packages (+220 Dependent packages)
Remove     2 Packages (+  1 Dependent package)

Total size: 666 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
/usr/lib/python2.7/site-packages/yum/history.py:761: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if checksum == sql_checksum:
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 316, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 219, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 732, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1766, in runTransaction
    self.skipped_packages, rpmdb_problems, cmdline)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 941, in beg
    pid   = self.pkg2pid(txmbr.po)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 798, in pkg2pid
    return self._ipkg2pid(po, create)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 792, in _ipkg2pid
    return self._pkgtup2pid(po.pkgtup, csum, create)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 775, in _pkgtup2pid
    checksum))
  File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 168, in executeSQLQmark
    return cursor.execute(query, params)
sqlite3.ProgrammingError: 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.

 

I've tried reinstalling python and yum so far, which didn't solve anything. Any help is appreciated :)

I'm using FC19 and kernel version 3.10.7-200.fc19.x86_64

edit retag flag offensive close merge delete

Comments

2

have a look at #9644, @TexasBullets seems to have successfully fixed the problem, but his solution is rather crude.

I've also found two related bug reports: Bug 447605 and Bug 570819

Jann5s gravatar imageJann5s ( 2013-10-06 09:05:59 -0500 )edit

Seems to be updating with the first link from @TexasBullets. cheers

dikkeduif gravatar imagedikkeduif ( 2013-10-07 01:27:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-11 20:37:33 -0500

joepreludian gravatar image

The problem happening is about some packages names are using 8-bit strings. I solved this error by patching history.py (/usr/lib/python2.7/site-packages/yum/history.py) with the following content:

https://gist.github.com/joepreludian/8948978

Try and see if You can get it working. I use Fedora 19. joepreludian@gmail.com

edit flag offensive delete link more

Comments

Can you please send this patch upstream to yum developers if you haven't already?

FranciscoD_ gravatar imageFranciscoD_ ( 2014-02-12 06:58:27 -0500 )edit

Hey! Thank You for reading. I don't know how to send a PR to it. Do You know where I find the repos? I'm going to google it. Thanks a lot!

joepreludian gravatar imagejoepreludian ( 2014-02-12 07:51:06 -0500 )edit

@joepreludian You can always attach patches to a bug report when in doubt :)

randomuser gravatar imagerandomuser ( 2014-02-12 23:32:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-10-06 01:57:00 -0500

Seen: 1,059 times

Last updated: Feb 11 '14