computer-janitor crashed with UnicodeEncodeError in _print_message()

Bug #621687 reported by Lucian Adrian Grijincu
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
computer-janitor (Ubuntu)
New
Medium
Unassigned

Bug Description

Binary package hint: computer-janitor

I just ran:

$ computer-janitor -h

Traceback (most recent call last):
  File "/usr/sbin/computer-janitor", line 35, in <module>
    main()
  File "/usr/share/computerjanitor/computerjanitorapp/cli/main.py", line 306, in main
    options = Options(runner)
  File "/usr/share/computerjanitor/computerjanitorapp/cli/main.py", line 112, in __init__
    self.arguments = self.parser.parse_args()
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1698, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1730, in parse_known_args
    return self._parse_known_args(args, namespace)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1932, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1872, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1800, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 1023, in __call__
    parser.print_help()
  File "/usr/lib/pymodules/python2.6/argparse.py", line 2319, in print_help
    self._print_message(self.format_help(), file)
  File "/usr/lib/pymodules/python2.6/argparse.py", line 2333, in _print_message
    file.write(message)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0103' in position 498: ordinal not in range(128)

However, not suplying "-h" leads to:

$ computer-janitor
usage: computer-janitor [-h] [--version] {ignore,unignore,find,clean} ...
computer-janitor: error: too few arguments

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: computer-janitor 2.0.2-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-17.23-generic 2.6.35.2
Uname: Linux 2.6.35-17-generic i686
Architecture: i386
Date: Sat Aug 21 12:58:48 2010
ExecutablePath: /usr/share/computerjanitor/computer-janitor
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100803.1)
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/sbin/computer-janitor -h
ProcEnviron:
 SHELL=/bin/bash
 LANG=ro_RO.utf8
PythonArgs: ['/usr/sbin/computer-janitor', '-h']
SourcePackage: computer-janitor
Title: computer-janitor crashed with UnicodeEncodeError in _print_message()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Barry Warsaw (barry) wrote :

This could be a locale issue with argparse. What locale are you running? Try running 'printenv' in a shell and pasting the values for the following environment variables:

LANGUAGE
LC_ALL
LC_MESSAGES
LANG

visibility: private → public
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote : Re: [Bug 621687] Re: computer-janitor crashed with UnicodeEncodeError in _print_message()

On Wed, Feb 16, 2011 at 12:39 AM, Barry Warsaw
<email address hidden> wrote:
> This could be a locale issue with argparse.  What locale are you
> running?  Try running 'printenv' in a shell and pasting the values for
> the following environment variables:
>
> LANGUAGE
> LC_ALL
> LC_MESSAGES
> LANG

gringo@lethe:~$ printenv | grep LANG
LANG=ro_RO.utf8
GDM_LANG=ro_RO.utf8

gringo@lethe:~$ printenv | grep LC_
<nothing printed>

gringo@lethe:~$ locale
LANG=ro_RO.utf8
LC_CTYPE="ro_RO.utf8"
LC_NUMERIC="ro_RO.utf8"
LC_TIME="ro_RO.utf8"
LC_COLLATE="ro_RO.utf8"
LC_MONETARY="ro_RO.utf8"
LC_MESSAGES="ro_RO.utf8"
LC_PAPER="ro_RO.utf8"
LC_NAME="ro_RO.utf8"
LC_ADDRESS="ro_RO.utf8"
LC_TELEPHONE="ro_RO.utf8"
LC_MEASUREMENT="ro_RO.utf8"
LC_IDENTIFICATION="ro_RO.utf8"
LC_ALL=

--
 .
..: Lucian

Changed in computer-janitor (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.