Bug 1087206 - [abrt] yum: optparse.py:140:__str__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Summary: [abrt] yum: optparse.py:140:__str__:UnicodeDecodeError: 'ascii' codec can't d...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:556ff2b852dfe59d2026cd159b1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-14 06:51 UTC by Ambrogio
Modified: 2015-06-29 20:04 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-29 20:04:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.01 KB, text/plain)
2014-04-14 06:51 UTC, Ambrogio
no flags Details
File: environ (3.47 KB, text/plain)
2014-04-14 06:51 UTC, Ambrogio
no flags Details

Description Ambrogio 2014-04-14 06:51:33 UTC
Description of problem:
yum update -yù
Plugin abilitati:fastestmirror, langpacks, refresh-packagekit
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 355, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 160, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 294, in getOptionsConfig
    (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
  File "/usr/share/yum-cli/cli.py", line 2205, in setupYumConfig
    (opts, cmds) = self.parse_args(args=args)
  File "/usr/lib64/python2.7/optparse.py", line 1401, in parse_args
    self.error(str(err))
  File "/usr/lib64/python2.7/optparse.py", line 140, in __str__
    return _("no such option: %s") % self.opt_str
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

I think it is not an error that should cause a crash and abort.

Version-Release number of selected component:
yum-3.4.3-137.fc20

Additional info:
reporter:       libreport-2.2.1
cmdline:        /usr/bin/python /usr/bin/yum update '-y\xc3\xb9'
dso_list:       python-libs-2.7.5-11.fc20.x86_64
executable:     /usr/bin/yum
kernel:         3.13.9-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
optparse.py:140:__str__:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 355, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 160, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 294, in getOptionsConfig
    (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
  File "/usr/share/yum-cli/cli.py", line 2205, in setupYumConfig
    (opts, cmds) = self.parse_args(args=args)
  File "/usr/lib64/python2.7/optparse.py", line 1401, in parse_args
    self.error(str(err))
  File "/usr/lib64/python2.7/optparse.py", line 140, in __str__
    return _("no such option: %s") % self.opt_str
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Local variables in innermost frame:
self: BadOptionError()

Comment 1 Ambrogio 2014-04-14 06:51:38 UTC
Created attachment 886033 [details]
File: backtrace

Comment 2 Ambrogio 2014-04-14 06:51:40 UTC
Created attachment 886034 [details]
File: environ

Comment 3 lordikc 2014-08-12 09:48:28 UTC
I had the same sort of problem with yum-3.4.3
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 371, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 277, in main
    return_code = base.doTransaction(inhibit=inhibit)
  File "/usr/share/yum-cli/cli.py", line 797, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1796, in runTransaction
    self._store_config_in_history()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 6713, in _store_config_in_history
    myrepos += repo.dump()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 527, in dump
    output = output + '%s = %s\n' % (attr, res)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 20: ordinal not in range(128)

The issue seems to be due to a non ascii character in my proxy password.
I added proxy_password to the list of excluded properties:
diff /usr/lib/python2.7/site-packages/yum/yumRepo.py /usr/lib/python2.7/site-packages/yum/yumRepo.py~
514c514
<                         'yumvar', 'repofile', 'multi_callback', 'proxy_password')
---
>                         'yumvar', 'repofile', 'multi_callback')

Comment 4 Fedora End Of Life 2015-05-29 11:33:47 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-06-29 20:04:58 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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