Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 495156

Summary: dev-util/catfish with dev-lang/python-2.7* and LC_ALL set to UTF-8 - /usr/share/catfish/bin/catfish.py: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 254: ordinal not in range(128)
Product: Gentoo Linux Reporter: Small_Penguin <dark.shadow>
Component: [OLD] DevelopmentAssignee: Desktop Misc. Team <desktop-misc>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 502536    
Bug Blocks:    

Description Small_Penguin 2013-12-23 20:43:28 UTC
First, there is a new version available from launchpad.net (0.8.2).

Next, here's the problem (LC_ALL=de_DE.UTF-8):
catfish --help
Traceback (most recent call last):
  File "/usr/share/catfish/bin/catfish.py", line 53, in <module>
    catfish.main()
  File "/usr/share/catfish/catfish/__init__.py", line 68, in main
    options, args = parse_options()
  File "/usr/share/catfish/catfish/__init__.py", line 61, in parse_options
    (options, args) = parser.parse_args()
  File "/usr/lib64/python2.7/optparse.py", line 1399, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.7/optparse.py", line 1443, in _process_args
    self._process_short_opts(rargs, values)
  File "/usr/lib64/python2.7/optparse.py", line 1550, in _process_short_opts
    option.process(opt, value, values, self)
  File "/usr/lib64/python2.7/optparse.py", line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib64/python2.7/optparse.py", line 810, in take_action
    parser.print_help()
  File "/usr/lib64/python2.7/optparse.py", line 1669, in print_help
    file.write(self.format_help().encode(encoding, "replace"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 254: ordinal not in range(128)

But:
LC_ALL=C catfish --help
Usage: catfish.pyc [options]

Options:
  --version          show program's version number and exit
  -h, --help         show this help message and exit
  -v, --verbose      Show debug messages (-vv debugs catfish_lib also)
  --large-icons      Use large icons
  --thumbnails       Use thumbnails
  --iso-time         Display time in ISO format
  --path=PATH        Search in folder PATH
  --fileman=FILEMAN  Use FILEMAN as filemanager
  --wrapper=WRAPPER  Use WRAPPER to open files
  --exact            Perform exact match
  --hidden           Include hidden files
  --fulltext         Perform fulltext search


This problem doesn't occur with PYTHON_SINGLE_TARGET="python3_3" but with PYTHON_SINGLE_TARGET="python2_7". Not sure what else breaks with old python.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-07-28 11:50:39 UTC
I'm not sure exactly what fixed this, but the problem seems to be gone in version 1.0.2. ChangeLog says something about improved handling of encoding.