[Reportbug-maint] Bug#579324: reportbug: does not start with different locale

Sandro Tosi morph at debian.org
Tue Apr 27 05:30:40 UTC 2010

reassign 579324 python2.5 python2.6

Hello Onur,
thanks for your report.

On Tue, Apr 27, 2010 at 03:17, Onur Aslan <onuraslan at gmail.com> wrote:
> Package: reportbug
> Version: 4.12.1
> Severity: normal
> When I try to run reportbug in my current locale (tr_TR.UTF-8) it's
> not starting. It's giving these error:
> $ reportbug
> Traceback (most recent call last):
>  File "/usr/bin/reportbug", line 47, in <module>
>    from reportbug.utils import (
> ImportError: cannot import name MODE_NOVICE

There's something weird going on here: I'm able to replicate this
problem with LANG=tr_TR.UTF-8 but the problem is inside python.

The code that is executed is:

MODELIST = ['novice', 'standard', 'advanced', 'expert']
for mode in MODELIST:
    exec 'MODE_%s=%d' % (mode.upper(), MODELIST.index(mode))
del mode

but with

~$ env | grep LAN

we obtain:

$ python -c "import reportbug.utils as u ; print dir(u)"
'USERFILE', '__builtins__', '__doc__', '__file__', '__name__',
'ascii_letters', 'available_package_description', 'check_email_addr',
'cleanup_msg', 'commands', 'debianbts', 'digits', 'fhs_directories',
'find_package_for', 'find_rewritten', 'first_run',
'generate_blank_report', 'get_arch', 'get_avail_database',
'get_changed_config_files', 'get_cpu_cores',
'get_debian_release_info', 'get_dependency_info', 'get_dpkg_database',
'get_email', 'get_email_addr', 'get_package_info',
'get_package_status', 'get_source_name', 'get_source_package',
'get_user_id', 'glob_escape', 'lsb_release_info', 'mua_exists',
'mua_is_supported', 'mua_name', 'os', 'our_lex', 'packages_providing',
'parse_bug_control_file', 'parse_config_files', 'pathdirs',
'platform', 'pwd', 'query_dpkg_for', 're', 'realpath', 'rfc822',
'search_path_for', 'search_pipe', 'shlex', 'socket', 'statuscache',
'subprocess', 'sys', 'tempfile_prefix', 'ui', 'which_editor']

notice the 'MODE_NOViCE' with lowercase 'i' instead of the expected

Reassigning this bug to both python2.5 and 2.6 since the problem is
replicable of both the supported version in sid/testing.

Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

More information about the Reportbug-maint mailing list