Bug 1317245

Summary: [abrt] dnf: i18n.py:44:write:UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 53: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Artem <artem.goncharov>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: artem.goncharov, jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/294934f25f443c380c4fd1bf6846911f7982889e
Whiteboard: abrt_hash:e507aa1f18ca854fdac9925c3dcb66af939c28e0;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-11 11:54:24 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: _var_log_dnf.log
none
File: backtrace
none
File: dnf-makecache.log
none
File: environ
none
dnf.librepo.log
none
yum.repos none

Description Artem 2016-03-13 10:04:00 UTC
Version-Release number of selected component:
dnf-1.1.5-1.fc23

Additional info:
reporter:       libreport-2.6.4
cmdline:        /usr/bin/python3 /bin/dnf search nodejs
executable:     /bin/dnf
kernel:         4.2.8-300.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
i18n.py:44:write:UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 53: ordinal not in range(128)

Traceback (most recent call last):
  File "/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/search.py", line 106, in run
    return self._search(extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/search.py", line 81, in _search
    args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 784, in matchcallback
    print(msg)
  File "/usr/lib/python3.4/site-packages/dnf/i18n.py", line 44, in write
    self.stream.write(s)
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 53: ordinal not in range(128)

Local variables in innermost frame:
self: <dnf.i18n.UnicodeStream object at 0x7fc20202bd68>
s: '\x1b[1mnodejs\x1b(B\x1b[m-es-to-primitive.noarch : ECMAScript “ToPrimitive” algorithm'

Comment 1 Artem 2016-03-13 10:04:07 UTC
Created attachment 1135846 [details]
File: _var_log_dnf.log

Comment 2 Artem 2016-03-13 10:04:08 UTC
Created attachment 1135847 [details]
File: backtrace

Comment 3 Artem 2016-03-13 10:04:11 UTC
Created attachment 1135848 [details]
File: dnf-makecache.log

Comment 4 Artem 2016-03-13 10:04:12 UTC
Created attachment 1135849 [details]
File: environ

Comment 5 Honza Silhan 2016-03-14 13:33:06 UTC
I am sorry but can't reproduce it. You even have LANG=C. Probably the `nodejs-es-to-primitive` was fixed and released again. IF you still experience this, please, reopen.

Comment 6 Artem 2016-03-16 20:11:56 UTC
Hi
I can still reproduce the bug with the latest updates

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/search.py", line 106, in run
    return self._search(extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/search.py", line 81, in _search
    args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 784, in matchcallback
    print(msg)
  File "/usr/lib/python3.4/site-packages/dnf/i18n.py", line 44, in write
    self.stream.write(s)
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 53: ordinal not in range(128)

Comment 7 Michal Luscon 2016-03-29 13:17:37 UTC
Could you please upload somewhere your /var/cache/dnf/fedora* and /var/cache/dnf/updates* folders and attach your dnf.librepo.log to this bugreport?

Comment 8 Artem 2016-03-30 18:09:14 UTC
Created attachment 1141893 [details]
dnf.librepo.log

Comment 9 Artem 2016-03-30 18:44:06 UTC
uploading 172M archive of the /var/cache/dnf/{updates,fedora}* content is quite complicated. I have just recently executed dnf distro-sync, so it is the actual state.

Please provide me a patch with more debugging or whatever else you need and I will apply it

Comment 10 Honza Silhan 2016-04-04 11:27:32 UTC
Can you upload your content if /etc/yum.repos.d/ directory and then try again `dnf search nodejs --refresh` whether you can still reproduce it, please?

Comment 11 Artem 2016-04-04 18:45:26 UTC
Created attachment 1143413 [details]
yum.repos

Yes, I can still reproduce the bug

Comment 12 Jaroslav Mracek 2016-04-11 11:54:24 UTC

*** This bug has been marked as a duplicate of bug 1279204 ***