Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1175839

Summary: [abrt] dnf: progress.py:148:end:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 223: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Milan Bouchet-Valat <nalimilan>
Component: librepoAssignee: Tomas Mlcoch <tmlcoch>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, fran, gnuedwin, jorti, jsilhan, keglo.stephane, mkolman, mluscon, nekohayo, packaging-team-maint, pnemade, rholy, theo.logiviere, tim.lauridsen, tmlcoch, yajo.sk8
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/295a3993ab6fb4fa105f27fe6918bf4ec433c853
Whiteboard: abrt_hash:99c9aa643922ba278e8ad5d29559835577908a2a
Fixed In Version: librepo-1.7.13-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-28 19:53:50 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: backtrace
none
File: environ none

Description Milan Bouchet-Valat 2014-12-18 17:23:54 UTC
Description of problem:
I ran sudo dnf upgrade, and it failed when trying to print an error:

Taille totale des téléchargements : 427 M
Est-ce correct [o/N] : o
Téléchargement des paquets :
[MIRROR] kernel-modules-extra-3.17.6-300.fc21.x86_64.rpm: Curl error: Timeout was reached for ftp://mirrors.ircam.fr/pub/fedora/linux/updates/21/x86_64/k/kernel-modules-extra-3.17.6-300.fc21.x86_64.rpm []
(1/257): kernel-3.17.6-300.fc21.x86_64.rpm       19 kB/s |  42 kB     00:02    
(2/257): kernel-modules-extra-3.17.6-300.fc21.x  43 kB/s | 2.2 MB     00:50    
(3/257): kernel-core-3.17.6-300.fc21.x86_64.rpm 351 kB/s |  18 MB     00:53    
(4/257): sane-backends-libs-1.0.24-12.fc21.i686  28 kB/s |  99 kB     00:03    
(5/257): libpcap-1.6.2-1.fc21.i686.rpm           90 kB/s | 143 kB     00:01    
(6/257): unixODBC-2.3.2-6.fc21.i686.rpm         149 kB/s | 422 kB     00:02    
(7/257): qt5-qttools-common-5.4.0-1.fc21.noarch  15 kB/s |  23 kB     00:01    
(8/257): qt5-qttools-libs-help-5.4.0-1.fc21.x86  69 kB/s | 203 kB     00:02    
(9/257): qt5-qttools-libs-designer-5.4.0-1.fc21 267 kB/s | 2.7 MB     00:10    
[MIRROR] qt5-qttools-libs-designercomponents-5.4.0-1.fc21.x86_64.rpm: Interrupted by header callback: Server reports Content-Length: 1686 but expected size is: 798864
[MIRROR] qt5-qttools-libs-clucene-5.4.0-1.fc21.x86_64.rpm: Interrupted by header callback: Server reports Content-Length: 1686 but expected size is: 50788
Traceback (most recent call last):            ] 331 kB/s |  24 MB     20:45 ETA
  File "/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 182, 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 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
    base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 237, in do_transaction
    total_cb)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 802, in download_packages
    errors = dnf.repo.download_payloads(payloads, drpm)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 125, in download_payloads
    librepo.download_packages(targets, failfast=True)
  File "/usr/lib64/python2.7/site-packages/librepo/__init__.py", line 1489, in download_packages
    return _librepo.download_packages(list, failfast)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 318, in _progress_cb
    self.progress.progress(self, done)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 69, in progress
    text = unicode(payload)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 318, in _progress_cb
    self.progress.progress(self, done)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 69, in progress
    text = unicode(payload)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 146, in new_func
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 315, in _mirrorfail_cb
    self.progress.end(self, dnf.callback.STATUS_MIRROR, err)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 148, in end
    msg = '%s%-*s\n' % (msg, left, err_msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 223: ordinal not in range(128)

Version-Release number of selected component:
dnf-0.6.2-1.fc21

Additional info:
reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -OO /bin/dnf upgrade
dso_list:       python-librepo-1.7.10-1.fc21.x86_64
executable:     /bin/dnf
kernel:         3.14.9-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
progress.py:148:end:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 223: ordinal not in range(128)

Traceback (most recent call last):
  File "/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 182, 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 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
    base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 237, in do_transaction
    total_cb)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 802, in download_packages
    errors = dnf.repo.download_payloads(payloads, drpm)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 125, in download_payloads
    librepo.download_packages(targets, failfast=True)
  File "/usr/lib64/python2.7/site-packages/librepo/__init__.py", line 1489, in download_packages
    return _librepo.download_packages(list, failfast)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 318, in _progress_cb
    self.progress.progress(self, done)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 69, in progress
    text = unicode(payload)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 318, in _progress_cb
    self.progress.progress(self, done)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 69, in progress
    text = unicode(payload)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 144, in new_func
    name = '%s.%s' % (args[0].__class__.__name__, fn.__name__)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 146, in new_func
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 315, in _mirrorfail_cb
    self.progress.end(self, dnf.callback.STATUS_MIRROR, err)
  File "/usr/lib/python2.7/site-packages/dnf/cli/progress.py", line 148, in end
    msg = '%s%-*s\n' % (msg, left, err_msg)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 223: ordinal not in range(128)

Local variables in innermost frame:
status: 3
text: u'qt5-qttools-libs-clucene-5.4.0-1.fc21.x86_64.rpm'
self: <dnf.cli.progress.MultiFileProgressMeter object at 0x7f744bf10050>
err_msg: "Curl error: Couldn't connect to server for ftp://mirrors.ircam.fr/pub/fedora/linux/updates/testing/21/x86_64/q/qt5-qttools-libs-clucene-5.4.0-1.fc21.x86_64.rpm [Failed to connect to mirrors.ircam.fr port 21: Connexion refus\xc3\xa9e]"
start: 1418923310.735334
left: 20
msg: u'[MIRROR] qt5-qttools-libs-clucene-5.4.0-1.fc21.x86_64.rpm: '
now: 1418923310.735334
payload: <dnf.repo.RPMPayload object at 0x7f744adc97d0>
size: 50788

Comment 1 Milan Bouchet-Valat 2014-12-18 17:23:58 UTC
Created attachment 970669 [details]
File: backtrace

Comment 2 Milan Bouchet-Valat 2014-12-18 17:23:59 UTC
Created attachment 970670 [details]
File: environ

Comment 3 dionney@hotmail.com 2014-12-20 11:47:15 UTC
Another user experienced a similar problem:

Error while doing

LANG=fr_CA.UTF8 dnf update


reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -OO /bin/dnf update
dso_list:       python-librepo-1.7.10-1.fc21.x86_64
executable:     /bin/dnf
kernel:         3.17.6-300.fc21.x86_64
package:        dnf-0.6.3-2.fc21
reason:         progress.py:148:end:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 223: ordinal not in range(128)
runlevel:       N 5
type:           Python
uid:            0

Comment 4 Honza Silhan 2015-01-06 12:48:35 UTC
*** Bug 1176368 has been marked as a duplicate of this bug. ***

Comment 5 Honza Silhan 2015-01-12 11:48:58 UTC
*** Bug 1177422 has been marked as a duplicate of this bug. ***

Comment 6 Honza Silhan 2015-01-12 12:03:27 UTC
*** Bug 1177519 has been marked as a duplicate of this bug. ***

Comment 7 Honza Silhan 2015-01-12 12:44:34 UTC
DNF expects all error messages from librepo Unicoded. Return errors from `check_finished_transfer_status` in Unicode, please.

Comment 8 Honza Silhan 2015-01-13 22:50:40 UTC
*** Bug 1178830 has been marked as a duplicate of this bug. ***

Comment 10 Honza Silhan 2015-01-19 12:20:27 UTC
*** Bug 1183310 has been marked as a duplicate of this bug. ***

Comment 11 Honza Silhan 2015-01-19 12:21:08 UTC
*** Bug 1183200 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2015-01-19 13:16:13 UTC
librepo-1.7.12-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/librepo-1.7.12-1.fc21

Comment 13 Fedora Update System 2015-01-20 21:00:11 UTC
Package librepo-1.7.12-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing librepo-1.7.12-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0896/librepo-1.7.12-1.fc21
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2015-01-23 15:04:31 UTC
librepo-1.7.13-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/librepo-1.7.13-1.fc21

Comment 15 Fedora Update System 2015-01-28 19:53:50 UTC
librepo-1.7.13-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Honza Silhan 2015-03-03 12:13:43 UTC
*** Bug 1193335 has been marked as a duplicate of this bug. ***