Bug 1118796 - TypeError: must be unicode, not str
TypeError: must be unicode, not str
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-11 10:24 EDT by Ankur Sinha (FranciscoD)
Modified: 2014-07-19 02:03 EDT (History)
5 users (show)

See Also:
Fixed In Version: hawkey-0.4.18-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-19 02:03:20 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 Ankur Sinha (FranciscoD) 2014-07-11 10:24:16 EDT
Description of problem:

Getting this stack trace consistently:


Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.py", line 388, in callback
    self._instProgress( bytes, total, h )
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmtrans.py", line 461, in _instProgress
    self.total_actions)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2399, in event
    percent, process, pkgname, wid1)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2417, in _out_event
    pkgname=pkgname, wid1=wid1)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 2449, in _makefmt
    pnl = exact_width(pkgname)
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 164, in exact_width
    return sum(_exact_width_char(c) for c in msg)
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 164, in <genexpr>
    return sum(_exact_width_char(c) for c in msg)
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 138, in _exact_width_char
    return 2 if unicodedata.east_asian_width(uchar) in ('W', 'F', 'A') else 1
TypeError: must be unicode, not str
FATAL ERROR: python callback <bound method RPMTransaction.callback of <dnf.yum.rpmtrans.RPMTransaction object at 0x29424d0>> failed, aborting!


Version-Release number of selected component (if applicable):
dnf-0.5.3-99.1007.20140710gitab3618e.fc20.noarch
librepo-1.7.5-99.1007.20140710gitf9ca1a4.fc20.x86_64
python-hawkey-0.4.18-99.1007.20140710gitec7689b.fc20.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Run a `dnf --best update -y`
2.
3.

Actual results:
Crashes with above trace back

Expected results:
Shouldn't crash

Additional info:
Using dnf from nightlies repo
Comment 1 Ankur Sinha (FranciscoD) 2014-07-11 10:26:10 EDT
Updated using yum to dnf-0.5.3-99.1008.20140711gite42d1de.fc20.noarch

Same error persists.
Comment 2 Ankur Sinha (FranciscoD) 2014-07-12 23:30:07 EDT
Persists with dnf-0.5.3-99.1009.20140711gite42d1de.fc20.noarch also
Comment 4 Ankur Sinha (FranciscoD) 2014-07-16 09:44:49 EDT
Hi,

Any hints on a workaround? Is this a locale related thing? I'm trying not to fall back to yum for updates but since dnf is broken, I'm sorta stuck.

Thanks for looking into this. Please let me know if there's a patch you'd like me to test.

Warm regards,
Ankur
Comment 5 Honza Silhan 2014-07-16 10:52:05 EDT
Hi Ankur, the bug has been fixed with b86d506 commit. Thanks for testing nightly builds.
Comment 6 Ankur Sinha (FranciscoD) 2014-07-16 20:39:49 EDT
(In reply to Jan Silhan from comment #5)
> Hi Ankur, the bug has been fixed with b86d506 commit. Thanks for testing
> nightly builds.

Thanks Jan, the commit probably hasn't hit the nightlies yet. I've just updated to dnf-0.5.3-99.1013.20140714git4d04f86.fc20.noarch and the bug still persists. I'll continue updating dnf over the next few days and confirm when the issue is fixed.

Warm regards,
Ankur
Comment 7 Fedora Update System 2014-07-17 02:42:48 EDT
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hawkey-0.4.18-2.fc20,dnf-0.5.4-1.fc20,libsolv-0.6.4-0.git2a5c1c4.fc20
Comment 8 Fedora Update System 2014-07-19 02:03:20 EDT
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been pushed to the Fedora 20 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.