Red Hat Bugzilla – Bug 869897
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128)
Last modified: 2013-10-14 06:47:37 EDT
Description of problem:
Half the time i boot fedora ( for all f18 kernels i used ) , after the loading process i get no login ( no graphical no text based ) ,and if i get one instead of some of the icons i see some random noiselike pictures ( for ex just above the login name or the power button icon , but if i move the mouse above it , i get the good one) .
Version-Release number of selected component:
libreport version: 2.0.16
cmdline: /usr/bin/python /usr/sbin/firstboot
:Traceback from firstboot:
:firstboot 18.5 exception report
:Traceback (most recent call last):
: File "/usr/sbin/firstboot", line 155, in <module>
: File "/usr/lib/python2.7/site-packages/firstboot/loader.py", line 68, in load_modules
: imported = __import__(module)
: File "/usr/share/firstboot/modules/create_user.py", line 34, in <module>
: from firstboot.pwcheck import Password
: File "/usr/lib/python2.7/site-packages/firstboot/pwcheck.py", line 41, in <module>
: class Password(object):
: File "/usr/lib/python2.7/site-packages/firstboot/pwcheck.py", line 48, in Password
: _("Fairly strong"),
: File "/usr/lib/python2.7/site-packages/firstboot/pwcheck.py", line 34, in <lambda>
: _ = lambda x: gettext.ldgettext("firstboot", x)
: File "/usr/lib64/python2.7/gettext.py", line 543, in ldgettext
: return t.lgettext(message)
: File "/usr/lib64/python2.7/gettext.py", line 368, in lgettext
: return tmsg.encode(locale.getpreferredencoding())
:UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128)
Created attachment 633163 [details]
File: other involved packages
Created attachment 633164 [details]
Created attachment 633165 [details]
Created attachment 633166 [details]
Created attachment 633167 [details]
Created attachment 633168 [details]
Can you please describe the details of an action that leads to this traceback?
A simple boot. No real action made here. I just boot the os.
The error occurs during boot. Sometime it even gets stuck after the fedora logo loaded (the f logo that fills up during boot).
OK, can you describe the exact install steps used to install system which behaves like this? There should be a kickstart file in /root, can you please attach it here too?
The attached environ file shows an invalid locale:
The workaround is to edit /etc/sysconfig/i18n and /etc/locale.conf:
Bug 858591 - anaconda setting invalid system locale xx.UTF-8 not xx_YY.UTF-8
$ LANG=hu.UTF-8 locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
$ locale -a | grep hu
Rerun firstboot with:
OS Release: Fedora release 18
(In reply to comment #12)
> Rerun firstboot with:
> Package: firstboot-18.5-1.fc18.x86_64
> OS Release: Fedora release 18
UnicodeEncodeError traceback reproduced by editing /etc/sysconfig/i18n and /etc/locale.conf:
and reenabling firstboot.
I didn't see any any graphics corruption, though.
What version of the installer disc was used? In particular, what version of anaconda?
Tested after installing and updating using 'sr_RS.UTF-8@latin':
$ qemu-kvm -m 4096 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC6/Fedora-18-Beta-TC6-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse
Good question . I have no idea . An early version of alfa. It was a nightly live compose iso. I downloaded it near the start of october. October 8 maybe.
Thanks. The nightly composes are kept for two weeks, but the version of anaconda used to install can be found in this log file:
Could you attach it?
The bug with the invalid locales was:
Fixed In Version: anaconda-18.13-1 
 Bug 858591 - anaconda setting invalid system locale xx.UTF-8 not xx_YY.UTF-8
Created attachment 636428 [details]
/var/log/messages with firstboot messages while locale is hu.UTF-8
This log is from the VM where I reproduced the UnicodeEncodeError traceback.
[snippets from /var/log/messages]
Oct 31 15:35:21 localhost firstboot: INFO:firstboot.frontend:setting LANG to hu.UTF-8
Oct 31 15:35:24 localhost firstboot: Using the fallback 'C' locale.
Oct 31 15:35:25 localhost firstboot: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128)
Searched all over for the log file mentioned but no luck here. There's no anaconda directory or file in the /var/log directory or anywhere else. Is that normal ?
Normally, anaconda copies its log files to /var/log/anaconda/. There could have been a bug in the version you installed with that prevented them from being copied. Did your install complete normally?
Since you installed from a Live CD, you might have anaconda installed:
$ rpm -q anaconda
$ sudo grep anaconda /var/log/yum.log
As a last resort, the timestamps from the oldest version of /var/log/messages might show when you installed:
$ ls -l /var/log/messages*
$ sudo head /var/log/messages # the oldest one you have
$ ls -lFt /var/log/ | tail
I don't remember any error during install.
$ sudo grep anaconda /var/log/yum.log gives:
Oct 06 04:13:58 Updated: anaconda-widgets-18.12-1.fc18.x86_64
Oct 06 04:14:50 Updated: anaconda-18.12-1.fc18.x86_64
Oct 18 02:27:15 Updated: anaconda-widgets-18.17-1.fc18.x86_64
Oct 18 02:28:42 Updated: anaconda-18.17-1.fc18.x86_64
Oct 19 06:49:38 Updated: anaconda-widgets-18.18-1.fc18.x86_64
Oct 19 06:50:51 Updated: anaconda-18.18-1.fc18.x86_64
Oct 20 08:51:52 Updated: anaconda-widgets-18.19-1.fc18.x86_64
Oct 20 08:51:54 Updated: anaconda-18.19-1.fc18.x86_64
Oct 27 00:40:06 Updated: anaconda-widgets-18.21-1.fc18.x86_64
Oct 27 00:40:20 Updated: anaconda-18.21-1.fc18.x86_64
Nov 02 05:15:35 Updated: anaconda-widgets-18.22-1.fc18.x86_64
Nov 02 05:15:58 Updated: anaconda-18.22-1.fc18.x86_64
Nov 02 23:44:50 Updated: anaconda-widgets-18.23-1.fc18.x86_64
Nov 02 23:44:52 Updated: anaconda-18.23-1.fc18.x86_64
(In reply to comment #19)
> I don't remember any error during install.
> $ sudo grep anaconda /var/log/yum.log gives:
> Oct 06 04:13:58 Updated: anaconda-widgets-18.12-1.fc18.x86_64
> Oct 06 04:14:50 Updated: anaconda-18.12-1.fc18.x86_64
Thanks. This means that you installed with a version of anaconda earlier than 18.12-1. Versions 18.12-1 and earlier have Bug 858591, which causes invalid locales to be written to these files:
If you want to confirm that the bug can be "fixed", you can edit them to have:
You can see all valid locale names with this:
$ ls /usr/share/i18n/locales/
Or you could reinstall with F18-Beta, which is due to be released 2012-11-13.
 Bug 858591, Comment 29
Subject: Fedora 18 Beta to slip by one week
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
The firstboot utility is deprecated and no longer developed in Fedora 19 and newer releases. It was replaced by the initial-setup utility with a completely different codebase. If you still have any similar problems with Fedora 19 or later, please file a new bug against initial-setup or gnome-initial-setup if you did a GNOME install.