Bug 480673

Summary: python strings are not encoded properly.
Product: [Fedora] Fedora Reporter: Tomasz Torcz <tomek>
Component: liveusb-creatorAssignee: kushaldas@gmail.com <mail>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: chris.brown, julian.fedora, lmacken, mail, updates
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-09 01:30:49 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 Tomasz Torcz 2009-01-19 19:15:52 UTC
running liveusb-creator-3.0-5.fc10.noarch with pl_PL.utf8 locale results in following:

[gui:444] F10-i686-Live.iso wybrano
[creator:451] Sprawdzanie systemu plików...
[creator:334] Przywracanie MBR...
[creator:554] Sprawdzanie sumy kontrolnej MD5 pliku ISO
[creator:195] Sprawdzanie sumy kontrolnej SHA1 obrazu Live CD...
[creator:486] Rozpakowywanie obrazu Live na urządzenie USB...
[creator:505] Zapisano do urządzenia na 5 MB/sec
[creator:243] Tworzenie 1024MB warstwa trwałości
[creator:517] Instalowanie programu startowego...
[gui:204] 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/liveusb/gui.py", line 194, in run
    self.live.install_bootloader()
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 523, in install_bootloader
    os.path.join(self.dest, 'syslinux'), self.drive['device']))
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 187, in popen
    self.write_log()
  File "/usr/lib/python2.5/site-packages/liveusb/creator.py", line 290, in write_log
    out.write(self.output.getvalue())
  File "/usr/lib64/python2.5/StringIO.py", line 270, in getvalue
    self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 25: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/liveusb/gui.py", line 334, in status
    self.textEdit.append(text)
TypeError: argument 1 of QTextEdit.append() has an invalid type

I had to proceed using "LANG=C LC_ALL=C" setting.

Comment 1 Christopher Brown 2009-02-01 01:55:29 UTC
I get the same error, albeit in rawhide.

[chris@kilimanjaro liveusb-creator-3.5]$ sudo LANG=de_DE.UTF-8 ./liveusb-creator
Traceback (most recent call last):
  File "./liveusb-creator", line 75, in <module>
    main()
  File "./liveusb-creator", line 70, in main
    LiveUSBApp(opts, sys.argv)
  File "/home/chris/liveusb-creator-3.5-1.fc11.src/liveusb-creator-3.5/liveusb/gui.py", line 54, in __init__
    self.mywindow = LiveUSBDialog(opts)
  File "/home/chris/liveusb-creator-3.5-1.fc11.src/liveusb-creator-3.5/liveusb/gui.py", line 245, in __init__
    self.populate_devices()
  File "/home/chris/liveusb-creator-3.5-1.fc11.src/liveusb-creator-3.5/liveusb/gui.py", line 275, in populate_devices
    self.textEdit.setPlainText(str(e).encode('utf8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 18: ordinal not in range(128)

Is it possible to revert:

https://fedorahosted.org/liveusb-creator/changeset/e872c822b1363bcfe70bb8049d96552627a4e14f/liveusb/gui.py

for Fedora 9 & 10 (as they won't see Python > 2.6 I imagine).

Comment 2 Fedora Update System 2009-02-19 09:18:23 UTC
Fixed in 20e3b20f17d64111a5f89525ccddf22d2d9c08d7

Comment 3 Luke Macken 2009-03-09 01:30:49 UTC
This issue should be resolved in version 3.6 of the liveusb-creator.  Please re-open this ticket if you still encounter this problem with the latest version.  Thanks!..