Description of problem: I was using dnf-plugins-core, but I'm surprised that abrt catch it. dnf copr list bkabrda =========================================================================================================== List of bkabrda coprs =========================================================================================================== 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 200, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 83, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1171, in run return self.command.run(self.base.extcmds) File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 132, in run msg = self.base.output.fmtKeyValFill(msg, desc) File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 704, in fmtKeyValFill keylen = exact_width(key) 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 Version-Release number of selected component: dnf-0.5.4-1.fc20 Additional info: reporter: libreport-2.2.3 cmdline: /usr/bin/python -OO /bin/dnf copr list bkabrda dso_list: dnf-plugins-core-0.1.1-2.fc20.noarch executable: /bin/dnf kernel: 3.14.7-200.fc20.x86_64 runlevel: N 5 type: Python uid: 0 Truncated backtrace: i18n.py:138:_exact_width_char:TypeError: must be unicode, not str 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 200, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 83, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1171, in run return self.command.run(self.base.extcmds) File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 132, in run msg = self.base.output.fmtKeyValFill(msg, desc) File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 704, in fmtKeyValFill keylen = exact_width(key) 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 Local variables in innermost frame: uchar: 'b'
Created attachment 921773 [details] File: backtrace
Created attachment 921774 [details] File: environ
Moving to the COPR guys. Miroslav, plugins are not supposed to use output.fmtKeyValFill(), it is not in the API. Also CCing jsilhan, FYI.
*** Bug 1128096 has been marked as a duplicate of this bug. ***
(In reply to Ales Kozumplik from comment #3) > Moving to the COPR guys. Miroslav, plugins are not supposed to use > output.fmtKeyValFill(), it is not in the API. I did this earlier, because couldn't find API func to do this. What now we have to fill this ?
(In reply to Igor Gnatenko from comment #5) > (In reply to Ales Kozumplik from comment #3) > > Moving to the COPR guys. Miroslav, plugins are not supposed to use > > output.fmtKeyValFill(), it is not in the API. > I did this earlier, because couldn't find API func to do this. > The correct approach is to open a bug against DNF describing the use case that you want the API to cover.
Filled.
*** Bug 1130391 has been marked as a duplicate of this bug. ***
I probably hit this too with dnf-plugins-core-0.1.1-3.fc20.noarch: $ sudo dnf copr search nitrate [sudo] password for bblaskov: ================================================== Matched: nitrate =================================================== 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 200, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 83, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1171, in run return self.command.run(self.base.extcmds) File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 153, in run msg = self.base.output.fmtKeyValFill(msg, desc) File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 704, in fmtKeyValFill keylen = exact_width(key) 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
I have made an easy workaround which fixes that: https://asamalik.fedorapeople.org/dnf_copr_search_workaround.patch
Adam, thanks for taking action but this patch could not work in Python 3. I made more complex patch that cover that but I need to test it.
Adam I took your patch, but instead used dnf.i18n.ucd() (which is documented in API) and the value is not needed to encode. So I minimalized it. Commited as b3be04f.
Another user experienced a similar problem: sudo dnf copr search python reporter: libreport-2.2.3 cmdline: /usr/bin/python -OO /bin/dnf copr search python3 dso_list: dnf-plugins-core-0.1.1-3.fc20.noarch executable: /bin/dnf kernel: 3.15.8-200.mst.fc20.x86_64 package: dnf-0.5.4-2.fc20 reason: i18n.py:138:_exact_width_char:TypeError: must be unicode, not str runlevel: N 5 type: Python uid: 0
*** Bug 1132109 has been marked as a duplicate of this bug. ***
dnf-plugins-core-0.1.3-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.3-1.fc21
Package dnf-plugins-core-0.1.3-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 dnf-plugins-core-0.1.3-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-10134/dnf-plugins-core-0.1.3-1.fc21 then log in and leave karma (feedback).
Why is this build for fc21 when this bug has target version set to fc20? Will it be backported to fc20?
The version field have semantics (you get this help, when you click on the label): This field is used to denote the version of the product that the problem is found in. So it was found in F20. But maintainers decided to fix it in F21. This is quite common to non-fatal bugs. Of course, you can always ask maintainers (akozumpl or jsilhan) to backport it to F20.
You are right. I will contact maintainers to submit patch to fc20 as well. Thank you.
dnf-plugins-core-0.1.3-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1154801 has been marked as a duplicate of this bug. ***
Could this be fixed in F20, please?
dnf-plugins-core-0.1.1-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.1-4.fc20
dnf-plugins-core-0.1.1-4.fc20 works
dnf-plugins-core-0.1.1-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.