Bug 1334023
| Summary: | [abrt] dnf: i18n.py:44:write:UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 20: ordinal not in range(128) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Sylvain Réault <vindicators> | ||||||||||
| Component: | dnf | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 24 | CC: | dov.grobgeld, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | x86_64 | ||||||||||||
| OS: | Unspecified | ||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/771aadb0e176005948802ec5d385a64b1be0f3ab | ||||||||||||
| Whiteboard: | abrt_hash:ca02044d9193e53cab370f517da958a06aa97c0b; | ||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2016-05-09 11:47:02 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: |
|
||||||||||||
Created attachment 1154820 [details]
File: _var_log_dnf.log
Created attachment 1154821 [details]
File: backtrace
Created attachment 1154822 [details]
File: dnf-makecache.log
Created attachment 1154823 [details]
File: environ
*** This bug has been marked as a duplicate of bug 1332012 *** I don't agree that this is a duplicate of 1332012 as its solution does not solve this bug: https://github.com/rpm-software-management/dnf/pull/484 This pull request does not touch .../dnf/i18.py which is where this bug crashes. To solve this bug the same treatment of the print statement as in pull 484 is needed. I.e. something similar like: - print(ucstring, end='') + try: + print(ucstring, end='') + except UnicodeEncodeError: + print(ucstring.encode(sys.stdout.encoding, 'backslashreplace')) |
Version-Release number of selected component: dnf-1.1.8-1.fc24 Additional info: reporter: libreport-2.7.0 cmdline: /usr/bin/python3 /usr/bin/dnf install yumex-dnf-4.1.6-1.fc24.noarch executable: /usr/bin/dnf kernel: 4.5.3-300.fc24.x86_64 pkg_fingerprint: 73BD E983 81B4 6521 pkg_vendor: Fedora Project reproducible: The problem is reproducible runlevel: N 5 type: Python3 uid: 0 Truncated backtrace: i18n.py:44:write:UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 20: ordinal not in range(128) 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.5/site-packages/dnf/cli/main.py", line 174, in user_main errcode = main(args) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 60, in main return _main(base, args) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 120, in _main ret = resolving(cli, base) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 149, in resolving base.do_transaction(display=displays) File "/usr/lib/python3.5/site-packages/dnf/cli/cli.py", line 200, in do_transaction if self.conf.assumeno or not self.output.userconfirm(): File "/usr/lib/python3.5/site-packages/dnf/cli/output.py", line 631, in userconfirm choice = dnf.i18n.ucd_input(msg) File "/usr/lib/python3.5/site-packages/dnf/i18n.py", line 109, in ucd_input print(ucstring, end='') File "/usr/lib/python3.5/site-packages/dnf/i18n.py", line 44, in write self.stream.write(s) UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 20: ordinal not in range(128) Local variables in innermost frame: self: <dnf.i18n.UnicodeStream object at 0x7f78ab8c0eb8> s: 'Est-ce correct [o/N]\xa0: '