ufw crashed with UnicodeDecodeError in get_loglevel(): 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

Bug #951317 reported by Karma Dorje
This bug report is a duplicate of:  Bug #953372: ufw 0.31: UnicodeDecodeError errors. Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ufw (Ubuntu)
Confirmed
Medium
Jamie Strandboge

Bug Description

# ufw version
ufw 0.31-0ubuntu1
Copyright 2008-2010 Canonical Ltd.

# python --version
Python 2.7.3rc1

# ufw status verbose
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 111, in <module>
    res = ui.do_action(pr.action, "", "", pr.force)
  File "/usr/lib/python2.7/dist-packages/ufw/frontend.py", line 580, in do_action
    res = self.get_status(True)
  File "/usr/lib/python2.7/dist-packages/ufw/frontend.py", line 246, in get_status
    out = self.backend.get_status(verbose, show_count)
  File "/usr/lib/python2.7/dist-packages/ufw/backend_iptables.py", line 416, in get_status
    (level, logging_str) = self.get_loglevel()
  File "/usr/lib/python2.7/dist-packages/ufw/backend.py", line 542, in get_loglevel
    rstr += "on (%s)" % (self.defaults['loglevel'])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: ufw 0.31-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Sat Mar 10 11:47:10 2012
ExecutablePath: /usr/sbin/ufw
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/sbin/ufw status verbose
PythonArgs: ['/usr/sbin/ufw', 'status', 'verbose']
SourcePackage: ufw
Title: ufw crashed with UnicodeDecodeError in get_loglevel(): 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
UpgradeStatus: Upgraded to precise on 2012-03-03 (6 days ago)
UserGroups:

Revision history for this message
Karma Dorje (taaroa) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thank you for using Ubuntu and reporting a bug. What locale are you using? Ie, can you please give the output of the 'locale' command?

visibility: private → public
Changed in ufw (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
status: New → Incomplete
importance: Undecided → Medium
Changed in ufw (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Karma Dorje (taaroa) wrote :

# locale
LANG=ru_RU.UTF-8
LANGUAGE=ru:en
LC_CTYPE=ru_RU.UTF-8
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE=ru_RU.UTF-8
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES=ru_RU.UTF-8
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

# ufw version
ufw 0.31-0ubuntu2
Copyright 2008-2010 Canonical Ltd.

# ufw status verbose
Статус: включен
Журналирование: on (low)
По умолчанию: deny (входящие), allow (исходящие)
Новые профили: skip

Revision history for this message
Sergey Shmakov (shmakov) wrote :

Try this

# sudo locale-gen en_US.UTF-8
# export LANG=en_US.UTF-8

This is works in my case - "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte"

Revision history for this message
fathi733@gmail.com (fathi733-gmail) wrote :

Thanks,
it helped me in arch also.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

@fathi733-gmail - this should've been fixed a long time ago. Anything you see now should be a new bug. Can you file one at https://bugs.launchpad.net/ufw/+filebug?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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