Bug 1217504 - UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 9: ordinal not in range(128)
Summary: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Shea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker abrt_hash:2fe9471403...
: 1217411 1217610 1222333 (view as bug list)
Depends On:
Blocks: F22FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2015-04-30 13:57 UTC by David Shea
Modified: 2015-05-17 23:27 UTC (History)
11 users (show)

Fixed In Version: python-blivet-1.0.9-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-13 01:17:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (661.15 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: anaconda.log (16.78 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: environ (571 bytes, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: journalctl (273.05 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: lsblk_output (3.17 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: nmcli_dev_list (1.07 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: os_info (463 bytes, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: program.log (68.08 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: storage.log (229.16 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details
File: ifcfg.log (2.25 KB, text/plain)
2015-04-30 13:57 UTC, David Shea
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1169019 0 unspecified CLOSED UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 11: ordinal not in range(128) 2021-02-22 00:41:40 UTC

Internal Links: 1169019

Description David Shea 2015-04-30 13:57:32 UTC
Description of problem:
I bet this is the first time someone ran a translated installer in Live!

Version-Release number of selected component:
anaconda-core-22.20.11-1.fc22.x86_64

The following was filed automatically by anaconda:
anaconda 22.20.11-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 336, in _doExecute
    StorageChecker.errors = str(e).split("\n")
  File "/usr/lib64/python2.7/threading.py", line 766, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 244, in run
    threading.Thread.run(self, *args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 9: ordinal not in range(128)

Additional info:
cmdline:        /usr/bin/python2  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Fedora-Live-WS-x86_64-22-T1 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.0.0-1.fc22.x86_64
other involved packages: python-libs-2.7.9-6.fc22.x86_64, anaconda-gui-22.20.11-1.fc22.x86_64
product:        Fedora
release:        Fedora release 22 (Twenty Two)
type:           anaconda
version:        22

Comment 1 David Shea 2015-04-30 13:57:35 UTC
Created attachment 1020596 [details]
File: anaconda-tb

Comment 2 David Shea 2015-04-30 13:57:36 UTC
Created attachment 1020597 [details]
File: anaconda.log

Comment 3 David Shea 2015-04-30 13:57:36 UTC
Created attachment 1020598 [details]
File: environ

Comment 4 David Shea 2015-04-30 13:57:38 UTC
Created attachment 1020600 [details]
File: journalctl

Comment 5 David Shea 2015-04-30 13:57:39 UTC
Created attachment 1020601 [details]
File: lsblk_output

Comment 6 David Shea 2015-04-30 13:57:40 UTC
Created attachment 1020602 [details]
File: nmcli_dev_list

Comment 7 David Shea 2015-04-30 13:57:41 UTC
Created attachment 1020603 [details]
File: os_info

Comment 8 David Shea 2015-04-30 13:57:43 UTC
Created attachment 1020604 [details]
File: program.log

Comment 9 David Shea 2015-04-30 13:57:44 UTC
Created attachment 1020605 [details]
File: storage.log

Comment 10 David Shea 2015-04-30 13:57:45 UTC
Created attachment 1020606 [details]
File: ifcfg.log

Comment 11 Fedora Blocker Bugs Application 2015-04-30 13:59:30 UTC
Proposed as a Blocker for 22-final by Fedora user dshea using the blocker tracking app because:

 Anything non-ASCII in a storage warning will crash the installer in a live environment.

Comment 12 David Shea 2015-04-30 14:33:51 UTC
As far as reproducer, I was running in German and left the storage spoke without selecting any disks.

Comment 13 Adam Williamson 2015-05-01 00:59:13 UTC
Well, the first since Beta - this will only have started breaking since we made translations unicodes rather than strs (which we did between Beta and Final TC1). The str(e) forces an encode of the unicode object, and we hit the good ol' 'with objects from other modules(?) the default encoding is ascii' problem (which is most extensively discussed at https://bugzilla.redhat.com/show_bug.cgi?id=1169019 ).

We could make it something like:

unicode(e).encode('utf-8').split("\n")

which would still work when it's not translated, because you can do "foobar".encode('utf-8') and it just gives you "foobar" back. But as mentioned in IRC today we're probably going to find crap like this all over the place, and I still think we want the 'force the default encoding to be utf-8 on lives as well as non-lives' hammer as the least worst choice here.

Using the convention of 'e' as an error, I find 30 instances of str(e) in current f22-branch; not all of those will necessarily be problematic as it seems like in *some* cases python somehow uses utf-8 when a utf-8 locale is set, it seems to be something like 'it uses ascii for objects imported from other libs' or something like that. See the note in https://bugzilla.redhat.com/show_bug.cgi?id=1169019#c35 - sgallagh and I started poking down that avenue at some point, but didn't get all the way. I'm guessing it's something like "modules / objects that get imported before we call setup_locale() in pyanaconda/ui/gui/spokes/welcome.py".

Comment 14 Dan Mossor [danofsatx] 2015-05-04 16:32:41 UTC
Discussed at the 2015-05-04 blocker review meeting.[0] Voted as AcceptedBlocker.

AcceptedBlocker - violates "When using the guided partitioning flow, the installer must be able to: ...  Reject or disallow invalid disk and volume configurations without crashing." in the case of a non-English live install.

[0] http://meetbot.fedoraproject.org/meetbot/fedora-blocker-review/2015-05-04/f22-blocker-review.2015-05-04-16.00.log.txt

Comment 15 David Shea 2015-05-06 14:20:55 UTC
*** Bug 1217411 has been marked as a duplicate of this bug. ***

Comment 16 David Shea 2015-05-06 14:21:04 UTC
*** Bug 1217610 has been marked as a duplicate of this bug. ***

Comment 17 Fedora Update System 2015-05-07 19:10:01 UTC
anaconda-22.20.12-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/anaconda-22.20.12-1.fc22

Comment 18 Adam Williamson 2015-05-08 22:59:43 UTC
I verified the 'encryption passphrase' case at least with TC3, will also check the 'reclaim space in German/Russian' case.

Comment 19 joerg.lechner 2015-05-09 11:21:07 UTC
"reclaim space in German" ok with TC3.
For me works.

Comment 20 Fedora Update System 2015-05-13 01:17:06 UTC
python-blivet-1.0.9-1.fc22, anaconda-22.20.12-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 David Shea 2015-05-17 23:27:03 UTC
*** Bug 1222333 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.