bzr qannotate fails with traceback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QBzr |
Fix Released
|
Critical
|
Alexander Belchenko |
Bug Description
Hallo, I have updated to new bazaar 1.3.0 and qbzr 0.9.0 and I got this traceback on qannotate:
.:gree@
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
win = AnnotateWindow(
File "/usr/lib/
return obj(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
item.setText(3, self.codec.
AttributeError: 'tuple' object has no attribute 'decode'
bzr 1.3 on python 2.4.5.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'qann', 'swiz/core/
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'cs_CZ.UTF-8'
plugins:
bzrtools /usr/lib/
email /usr/lib/
gtk /usr/lib/
launchpad /usr/lib/
qbzr /usr/lib/
rebase /usr/lib/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
All other q-commands work fine for me.
Cheers,
--
AK
Related branches
Changed in qbzr: | |
status: | Fix Committed → Fix Released |
This is because of difference between Python 2.5.x and Python 2.4.x. In Python 2.4 codecs. lookup( 'utf-8' ) returns tuple utf_8.StreamRea der at 0x00956540>, <class encodings. utf_8.StreamWri ter at 0x00956510>)
(<built-in function utf_8_encode>, <function decode at 0x00957670>, <class encodings.
but in Python 2.5 the same statement returns object <codecs.CodecInfo object for encoding utf-8 at 0x10a95e0>, that supports tuple-like interface to access by index.
We should either switch to tuple-like interface, i.e. decoder = codecs. lookup( ...)[1] or use special functions like codecs. getdecoder( ...)