Bug 1118796 - TypeError: must be unicode, not str
Summary: TypeError: must be unicode, not str
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 14:24 UTC by Ankur Sinha (FranciscoD)
Modified: 2014-07-19 06:03 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2014-07-19 06:03:20 UTC


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2014-07-11 14:24:16 UTC
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 14:26:10 UTC
Updated using yum to dnf-0.5.3-99.1008.20140711gite42d1de.fc20.noarch

Same error persists.

Comment 2 Ankur Sinha (FranciscoD) 2014-07-13 03:30:07 UTC
Persists with dnf-0.5.3-99.1009.20140711gite42d1de.fc20.noarch also

Comment 4 Ankur Sinha (FranciscoD) 2014-07-16 13:44:49 UTC
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 14:52:05 UTC
Hi Ankur, the bug has been fixed with b86d506 commit. Thanks for testing nightly builds.

Comment 6 Ankur Sinha (FranciscoD) 2014-07-17 00:39:49 UTC
(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 06:42:48 UTC
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 06:03:20 UTC
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.