I have just tried to upgrade to 13.10 from 13.04 and I have received the following error in console
Checking for a new Ubuntu release
authenticate 'saucy.tar.gz' against 'saucy.tar.gz.gpg'
extracting 'saucy.tar.gz'
Traceback (most recent call last):
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/saucy", line 10, in <module>
sys.exit(main())
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/DistUpgrade/DistUpgradeMain.py", line 240, in main
save_system_state(logdir)
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/DistUpgrade/DistUpgradeMain.py", line 133, in save_system_state
scrub_sources=True)
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/DistUpgrade/apt_clone.py", line 149, in save_state
self._write_state_sources_list(tar, scrub_sources)
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/DistUpgrade/apt_clone.py", line 241, in _write_state_sources_list
"./etc/apt/sources.list.d/"+source)
File "/tmp/user/0/ubuntu-release-upgrader-xnzjbd/DistUpgrade/apt_clone.py", line 246, in _add_file_to_tar_with_password_check
for line in f.readlines():
File "/usr/lib/python2.7/codecs.py", line 296, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9f in position 3: invalid start byte
This is in what I get in update-manager
gui
do-release-upgrade crashed on UnicodeDecodeError in decode(): 'utf8' codec can't decode byte 0x9f in position 3 : invalid state
Check out sources.list.d for any dotfiles (files starting with a period) containing binary garbage (which the python unicode decoder blows chunks on). I had this same problem and when I removed the dotfiles out of /etc/apt/sources.list.d/ it worked again.
Just for anyone with similar problems, the easiest solution is:
Easy peasy. And this works for a lot of similar
UTF-8
issues related to any kind of installs. Believe me!I had a slightly different cause and solution, but the answer by user204109 helped out on this one.
Basically, I had some non-conforming utf-8 characters in files under
/etc/apt/sources.list.d/
inserted by earlier dist upgrade scripts. This is, because my native language has some non ASCII characters, and apparently the localization was not quite correct earlier.Simplest way to find the culprits is to run:
Then open in editor each of the files that is not listed as "ASCII text" and remove any characters that seem like garbage.