Bug 1264125 - UnicodeEncodeError running dnf repoquery
UnicodeEncodeError running dnf repoquery
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 10:34 EDT by David Shea
Modified: 2015-10-23 13:20 EDT (History)
8 users (show)

See Also:
Fixed In Version: dnf-plugins-core-0.1.13-1.fc23 dnf-plugins-core-0.1.13-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-17 11:51:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Shea 2015-09-17 10:34:08 EDT
Description of problem:
$ dnf repoquery --info mom
...
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 1085, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 398, in run
    pkgs.add(fmt_fn(po))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 74, in info_format
    return QUERY_INFO.format(pkg)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 468, in __getattr__
    return str(atr)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 656: ordinal not in range(128)


Version-Release number of selected component (if applicable):
dnf-1.1.1-2.fc22.noarch
Comment 1 Carl George 2015-09-18 19:33:37 EDT
I see the same issue when I query the package python-requests.  Strangely enough, a regular `dnf info` can parse this unicode apostrophe character just fine.

$ dnf info python-requests
Last metadata expiration check performed 3:59:47 ago on Fri Sep 18 13:44:17 2015.
Installed Packages
Name        : python-requests
Arch        : noarch
Epoch       : 0
Version     : 2.7.0
Release     : 1.fc22
Size        : 340 k
Repo        : @System
From repo   : updates
Summary     : HTTP library, written in Python, for human beings
URL         : http://pypi.python.org/pypi/requests
License     : ASL 2.0
Description : Most existing Python modules for sending HTTP requests are extremely verbose and
            : cumbersome. Python’s built-in urllib2 module provides most of the HTTP
            : capabilities you should need, but the API is thoroughly broken. This library is
            : designed to make HTTP requests easy for developers.

$ dnf repoquery --info python-requests
Last metadata expiration check performed 3:59:51 ago on Fri Sep 18 13:44:17 2015.
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 1085, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 398, in run
    pkgs.add(fmt_fn(po))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 74, in info_format
    return QUERY_INFO.format(pkg)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/repoquery.py", line 468, in __getattr__
    return str(atr)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 99: ordinal not in range(128)
Comment 2 Radek Holy 2015-09-21 05:05:28 EDT
We'll take a look.
Comment 3 Fedora Update System 2015-10-14 13:00:06 EDT
dnf-1.1.3-1.fc23 dnf-plugins-extras-0.0.11-1.fc23 dnf-plugins-core-0.1.13-1.fc23 hawkey-0.6.2-1.fc23 libsolv-0.6.14-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-a011ac001a
Comment 4 Fedora Update System 2015-10-14 13:02:05 EDT
dnf-1.1.3-1.fc22 dnf-plugins-extras-0.0.11-1.fc22 dnf-plugins-core-0.1.13-1.fc22 hawkey-0.6.2-1.fc22 libsolv-0.6.14-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-02efefba0e
Comment 5 Fedora Update System 2015-10-14 18:52:18 EDT
dnf-1.1.3-1.fc23, dnf-plugins-core-0.1.13-1.fc23, dnf-plugins-extras-0.0.11-1.fc23, hawkey-0.6.2-1.fc23, libsolv-0.6.14-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf-plugins-extras dnf libsolv'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-a011ac001a
Comment 6 Fedora Update System 2015-10-15 01:51:51 EDT
dnf-1.1.3-1.fc22, dnf-plugins-core-0.1.13-1.fc22, dnf-plugins-extras-0.0.11-1.fc22, hawkey-0.6.2-1.fc22, libsolv-0.6.14-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hawkey dnf-plugins-core dnf-plugins-extras dnf libsolv'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-02efefba0e
Comment 7 Fedora Update System 2015-10-17 11:51:17 EDT
dnf-1.1.3-1.fc23, dnf-plugins-core-0.1.13-1.fc23, dnf-plugins-extras-0.0.11-1.fc23, hawkey-0.6.2-1.fc23, libsolv-0.6.14-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2015-10-23 13:19:40 EDT
dnf-1.1.3-1.fc22, dnf-plugins-core-0.1.13-1.fc22, dnf-plugins-extras-0.0.11-1.fc22, hawkey-0.6.2-1.fc22, libsolv-0.6.14-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

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