Bug 1279356

Summary: [abrt] dnf: i18n.py:109:ucd_input:UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte
Product: [Fedora] Fedora Reporter: sheepdestroyer <sheepdestroyer>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 23CC: jsilhan, mluscon, packaging-team-maint, pnemade, sheepdestroyer, ssmetana, vmukhame
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/2e8f900b943e7fe23e1a32326a17c0c9210d139b
Whiteboard: abrt_hash:a22862c46e06e4ea056b4366a863d3e9cafb2584;VARIANT_ID=workstation;
Fixed In Version: dnf-1.1.9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-01 12:41:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: _var_log_dnf.log
none
File: backtrace
none
File: dnf-makecache.log
none
File: environ none

Description sheepdestroyer 2015-11-09 09:38:35 UTC
Description of problem:
said "no" to dnf's question to update: 

...
...
Upgrade  56 Packages

Total download size: 122 M
Is this ok [y/N]:  n
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 144, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 173, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 200, in do_transaction
    if self.conf.assumeno or not self.output.userconfirm():
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 631, in userconfirm
    choice = dnf.i18n.ucd_input(msg)
  File "/usr/lib/python3.4/site-packages/dnf/i18n.py", line 109, in ucd_input
    return dnf.pycomp.raw_input()
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte
[sheepdestroyer@sheepora ~] $ 

Version-Release number of selected component:
dnf-1.1.3-1.fc23

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python3 -OO /bin/dnf update --refresh --enablerepo=*testing
executable:     /bin/dnf
kernel:         4.2.5-300.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
i18n.py:109:ucd_input:UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 144, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 173, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 200, in do_transaction
    if self.conf.assumeno or not self.output.userconfirm():
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 631, in userconfirm
    choice = dnf.i18n.ucd_input(msg)
  File "/usr/lib/python3.4/site-packages/dnf/i18n.py", line 109, in ucd_input
    return dnf.pycomp.raw_input()
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte

Local variables in innermost frame:
ucstring: 'Is this ok [y/N]: '

Comment 1 sheepdestroyer 2015-11-09 09:38:41 UTC
Created attachment 1091660 [details]
File: _var_log_dnf.log

Comment 2 sheepdestroyer 2015-11-09 09:38:42 UTC
Created attachment 1091661 [details]
File: backtrace

Comment 3 sheepdestroyer 2015-11-09 09:38:59 UTC
Created attachment 1091662 [details]
File: dnf-makecache.log

Comment 4 sheepdestroyer 2015-11-09 09:39:01 UTC
Created attachment 1091663 [details]
File: environ

Comment 5 Honza Silhan 2015-11-18 13:25:09 UTC
we can't reproduce it. You even have en LANG set. Still it seems there were additional special characters included. Anyone who experience this, please, reopen and post what you have typed as the answer.

Comment 6 sheepdestroyer 2016-03-04 02:04:15 UTC
I think I typed a japanese character by mistake, then deleted it (backspace) before reentering "n" with proper english input that time.

Weird that this problem happened as I only had "n" entered when I pressed enter

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:38:11 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Štěpán Smetana 2016-08-01 12:41:39 UTC
Works for me.
Should be fixed in dnf-1.1.9 (Take a look at this commit https://github.com/rpm-software-management/dnf/commit/93159e360f0b6150e598bba783e22ca113201a40)
In case reopen this bug.
Thanks

*** This bug has been marked as a duplicate of bug 1295090 ***