Bug 473584

Summary: livecd-creator crashes with unicode encode error
Product: [Fedora] Fedora Reporter: Luis Felipe Marzagao <lfelipebm>
Component: livecd-toolsAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: cedric.olivier, christoph.wickert, davidz, ivazqueznet, katzj
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-10 01:44:54 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:

Description Luis Felipe Marzagao 2008-11-29 15:37:29 UTC
Description of problem:

This error occurs right after repos repomod.xml retrieving:

Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 136, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 128, in main
    logging.error("Error creating Live CD : %s" % e)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 63: ordinal not in range(128)


Version-Release number of selected component (if applicable):

livecd-tools-020-1.fc10.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Try to build a pt_BR livecd

  
Actual results:

The afore mentioned.

Expected results:

livecd should be built.

Comment 1 Jeremy Katz 2008-12-01 18:02:01 UTC
Can you run with a locale of en_US.UTF-8 so that the real error gets shown? Also, what config are you using?

Comment 2 Cédric OLIVIER 2008-12-11 21:59:03 UTC
I have the same problem, with a locale of en_US.UTF-8 and an i686 platform.

[creator:403] Extracting ISO to device
INFO:liveusb.creator:Extracting ISO to device
[creator:138] mount -o loop,ro /home/ced/Téléchargement/F10-i686-Live.iso /tmp/tmpPEb0JI
INFO:liveusb.creator:mount -o loop,ro /home/ced/Téléchargement/F10-i686-Live.iso /tmp/tmpPEb0JI
[creator:138] cp /tmp/tmpPEb0JI/LiveOS/squashfs.img '/media/LIVEUSB/LiveOS/squashfs.img'
INFO:liveusb.creator:cp /tmp/tmpPEb0JI/LiveOS/squashfs.img '/media/LIVEUSB/LiveOS/squashfs.img'
[creator:419] Copied at 2 MB/sec
INFO:liveusb.creator:Copied at 2 MB/sec
[creator:138] cp /tmp/tmpPEb0JI/LiveOS/osmin.img '/media/LIVEUSB/LiveOS/osmin.img'
INFO:liveusb.creator:cp /tmp/tmpPEb0JI/LiveOS/osmin.img '/media/LIVEUSB/LiveOS/osmin.img'
[creator:419] Copied at 681 MB/sec
INFO:liveusb.creator:Copied at 681 MB/sec
[creator:138] cp /tmp/tmpPEb0JI/isolinux/* '/media/LIVEUSB/isolinux'
INFO:liveusb.creator:cp /tmp/tmpPEb0JI/isolinux/* '/media/LIVEUSB/isolinux'
[creator:138] umount /tmp/tmpPEb0JI
INFO:liveusb.creator:umount /tmp/tmpPEb0JI
[creator:430] Installing bootloader
INFO:liveusb.creator:Installing bootloader
[creator:138] syslinux   -d /media/LIVEUSB/syslinux /dev/sdd1
INFO:liveusb.creator:syslinux   -d /media/LIVEUSB/syslinux /dev/sdd1
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/liveusb/gui.py", line 185, in run
    self.live.install_bootloader()
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 436, in install_bootloader
    os.path.join(self.dest, 'syslinux'), self.drive['device']))
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 147, in popen
    self.write_log()
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 235, in write_log
    out.write(self.output.getvalue())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 28: ordinal not in range(128)

Comment 3 Jeremy Katz 2008-12-19 21:01:43 UTC
(In reply to comment #2)
> I have the same problem, with a locale of en_US.UTF-8 and an i686 platform.

This isn't the same problem as it's from liveusb-creator, not livecd-tools.

And I can't reproduce the initial reporter's problem even with some more trying today, so going to close.  If you have further information to add to the report, please reopen or add a new report

Comment 4 Christoph Wickert 2009-03-10 01:29:37 UTC
Reopening, because also happens to me and I think I know why:

[root@wicktop spin-kickstarts]# locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

[root@wicktop spin-kickstarts]# livecd-creator -c fedora-livecd-xfce.ks 
...
Retrieving http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/development/i386/os/repodata/repomd.xml ...OK
Retrieving http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/development/i386/os/repodata/d27c9a03c3f5d016b1e6b6799b47150b82c4f44f90fa640cc3792328b6c878f3-primary.sqlite.bz2 ...OK
Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 136, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 128, in main
    logging.error("Error creating Live CD : %s" % e)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 72: ordinal not in range(128)

[root@wicktop spin-kickstarts]# LANG=C livecd-creator -c fedora-livecd-xfce.ks 
...
Error creating Live CD : Failed to find package 'drivel' : No package(s) available to install


Removing drivel from the ks fixes the error. So I think livecd-creator just fails to return a proper error message about the missing package with certain locales.

Comment 5 Jeremy Katz 2009-03-10 01:44:54 UTC
We had seen that one, but it was supposed ot have been fixed.  That said, all such cases should be fixed with a patch that's in livecd-tools-022 as it's pretty aggressive about ensure that the output of exceptions is "ok"

Comment 6 Christoph Wickert 2009-03-10 02:38:30 UTC
Confirmed.