Bug 877332 - [abrt] UnicodeDecodeError running 'dnf history' as a normal user on fresh install
Summary: [abrt] UnicodeDecodeError running 'dnf history' as a normal user on fresh ins...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:20a97c0c91f2f65fe4932078073...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-16 09:37 UTC by Vít Ondruch
Modified: 2014-09-30 23:40 UTC (History)
2 users (show)

Fixed In Version: dnf-0.2.17
Clone Of:
Environment:
Last Closed: 2013-03-25 09:45:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: executable (12 bytes, text/plain)
2012-11-16 09:37 UTC, Vít Ondruch
no flags Details
File: environ (2.78 KB, text/plain)
2012-11-16 09:38 UTC, Vít Ondruch
no flags Details
File: core_backtrace (959 bytes, text/plain)
2012-11-16 09:38 UTC, Vít Ondruch
no flags Details

Description Vít Ondruch 2012-11-16 09:37:54 UTC
Description of problem:
Trying to get history out of DNF without user privileges, on system with czech locales.

Version-Release number of selected component:
dnf-0.2.15-3.git5d85f6b.fc18

Additional info:
libreport version: 2.0.18
abrt_version:   2.0.18
cmdline:        /usr/bin/python /usr/bin/dnf history
kernel:         3.6.6-3.fc18.x86_64

backtrace:
:history.py:672:__init__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
:
:Traceback (most recent call last):
:  File "/usr/bin/dnf", line 35, in <module>
:    yummain.user_main(sys.argv[1:], exit_code=True)
:  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 316, in user_main
:    errcode = main(args)
:  File "/usr/lib/python2.7/site-packages/dnf/cli/yummain.py", line 98, in main
:    base.getOptionsConfig(args)
:  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 363, in getOptionsConfig
:    self.parseCommands() # before we return check over the base command + args
:  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 405, in parseCommands
:    self.yum_cli_commands[self.basecmd].doCheck(self, self.basecmd, self.extcmds)
:  File "/usr/lib/python2.7/site-packages/dnf/cli/yumcommands.py", line 2404, in doCheck
:    elif not os.access(base.history._db_file, os.R_OK):
:  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 773, in <lambda>
:    history = property(fget=lambda self: self._getHistory(),
:  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 750, in _getHistory
:    releasever=releasever)
:  File "/usr/lib/python2.7/site-packages/dnf/yum/history.py", line 672, in __init__
:    msg = _("Unable to initialize yumdb history: %s") % str(e)
:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
:
:Local variables in innermost frame:
:e: OSError(13, 'Operace zam\xc3\xadtnuta')
:self: <dnf.yum.history.YumHistory object at 0x1cece90>
:releasever: '18'
:yumdb: <dnf.yum.rpmsack.RPMDBAdditionalData object at 0x1ceced0>
:root: '/'
:db_path: '/var/lib/dnf/history'

Comment 1 Vít Ondruch 2012-11-16 09:37:57 UTC
Created attachment 646261 [details]
File: executable

Comment 2 Vít Ondruch 2012-11-16 09:38:00 UTC
Created attachment 646262 [details]
File: environ

Comment 3 Vít Ondruch 2012-11-16 09:38:02 UTC
Created attachment 646263 [details]
File: core_backtrace

Comment 4 Ales Kozumplik 2012-11-16 14:49:28 UTC
Discussed this with Vit today: we weren't able to reproduce it on his computer but it seems the conditions under which it happened was:
- terminal output, UTF8 terminal encoding
- all locales set to "cs_CZ.UTF-8"

Comment 5 Ales Kozumplik 2012-11-16 14:52:23 UTC
OK I managed to reproduce this:
1) as root rename /var/lib/dnf to something else
2) as normal user do 'dnf history'

Comment 6 Ales Kozumplik 2012-11-19 16:00:42 UTC
Fixed by cecdfbb.


Note You need to log in before you can comment on or make changes to this bug.