Bug 1277671

Summary: [abrt] dnf: argparse.py:290:_join_parts:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 96: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Frank Büttner <bugzilla>
Component: dnf-plugin-system-upgradeAssignee: Will Woods <wwoods>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame, wwoods, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/1f6b82dc8f75a938e3291d1a082a5d2925a25526
Whiteboard: abrt_hash:97439e440513ac7ca597bed80b6b859ff3953f8b;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-09 12:37:20 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: dso_list
none
File: environ none

Description Frank Büttner 2015-11-03 19:35:17 UTC
Description of problem:
call sudo dnf system-upgrade help
I think the plug-in don't catch wrong parameter..

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

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python -OO /usr/bin/dnf system-upgrade help
executable:     /usr/bin/dnf
kernel:         4.2.3-200.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
argparse.py:290:_join_parts:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 96: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 136, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1091, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 421, in run
    self._call_sub("run", extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 429, in _call_sub
    subfunc(*args)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 507, in run_help
    self.parser.print_help()
  File "/usr/lib64/python2.7/argparse.py", line 2340, in print_help
    self._print_message(self.format_help(), file)
  File "/usr/lib64/python2.7/argparse.py", line 2314, in format_help
    return formatter.format_help()
  File "/usr/lib64/python2.7/argparse.py", line 281, in format_help
    help = self._root_section.format_help()
  File "/usr/lib64/python2.7/argparse.py", line 212, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/lib64/python2.7/argparse.py", line 290, in _join_parts
    if part and part is not SUPPRESS])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 96: ordinal not in range(128)

Local variables in innermost frame:
part_strings: [u'usage: dnf system-upgrade [--releasever VERSION] [--datadir DATADIR]\n                          [--no-downgrade]\n                          [{download,clean,reboot,upgrade,help,log}] [number]\n\n', '\npositional arguments:\n  {download,clean,reboot,upgrade,help,log}\n                        auszuf\xc3\xbchrende Aktion\n\n', '', u'\nDownload-Optionen:\n  --releasever VERSION  Release-Version (required)\n  --datadir DATADIR     heruntergeladene Daten an diesem Ort speichern\n  --no-downgrade        installierte Pakete behalten, wenn deren Version neuer\n                        als die des aktualisierten Systems ist\n\n', u'\nProtokoll-Optionen:\n  number                which logs to show (-1 is last, etc)\n\n']
self: <argparse.HelpFormatter object at 0x7fdfc6623090>
part: u'\nProtokoll-Optionen:\n  number                which logs to show (-1 is last, etc)\n\n'

Comment 1 Frank Büttner 2015-11-03 19:35:24 UTC
Created attachment 1089183 [details]
File: _var_log_dnf.log

Comment 2 Frank Büttner 2015-11-03 19:35:26 UTC
Created attachment 1089184 [details]
File: backtrace

Comment 3 Frank Büttner 2015-11-03 19:35:32 UTC
Created attachment 1089185 [details]
File: dnf-makecache.log

Comment 4 Frank Büttner 2015-11-03 19:35:34 UTC
Created attachment 1089186 [details]
File: dso_list

Comment 5 Frank Büttner 2015-11-03 19:35:36 UTC
Created attachment 1089187 [details]
File: environ

Comment 6 Honza Silhan 2015-11-09 12:37:20 UTC
Please upgrade system-upgrade plugin first `dnf upgrade "dnf-command(system-upgrade)" ---disableplugin=system-upgrade`. This should have been fixed by having all characters unicoded in the plugin [1].

[1] https://github.com/rpm-software-management/dnf-plugin-system-upgrade/issues/17

Comment 7 Honza Silhan 2015-11-09 14:29:09 UTC
Actually AFAIK it's not fixed in dnf-plugin-system-upgrade-0.5.