Digging a little deeper, specifically in /usr/lib/ubiquity/plugins/ubi-
prepare.py, in the method setup_sufficient_space() there is a call to a
subprocess, that subprocess being parted_devices. Running parted_devices
on your own in terminal with this device will report the above "HBG4a"
and unicode character, but since this is not UTF8 I think the python
script will fail since the default stance on errors is to fail with an
error code, UnicodeDecodeError(). To bypass this, I modified that call
to be as such:

proc = subprocess.Popen(['parted_devices'], stdout=subprocss.PIPE,
encoding='iso-8859-1', universal_newlines=True)

This allows it to at least get passed this reported error. But
subsequently, it will fail on ubi-partman.py with error code 141
(unknown what it means), and will not enter the partition manager in
ubiquity (skips it entirely).

The problem seems that this unicode naming keeps coming back to haunt
the python scripts as it attempts to run the partition manager. Ideally,
it would be great to remove this unicode in the name entirely since I
don't think it will affect the partitioning in any way (I even looked
into where the hardware reports this from and if it can be manually
changed, but so far no dice). Otherwise, I'm stuck with hunting through
all the scripts that do these calls and reads from the name and patch
them to work with the iso-8859-1 encoding.

Onward.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1740026

Title:
  ubiquity crashed with UnicodeDecodeError in decode(): 'utf-8' codec
  can't decode byte 0x91 in position 269: invalid start byte

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1740026/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to