Variety crashed if user's home directory path contains Unicode characters(variety crashed with UnicodeDecodeError in expanduser(): 'ascii' codec can't decode byte 0xe6 in position 6: ordinal not in range(128))
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Variety |
New
|
Undecided
|
Unassigned | ||
variety (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
As title
```
Lin-Buo-
/usr/lib/
from gi.repository import Gtk, Gdk, GObject # pylint: disable=E0611
/usr/lib/
from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, Gio, Notify # pylint: disable=E0611
/usr/lib/
from gi.repository import Gtk, WebKit, GObject # pylint: disable=E0611
/usr/lib/
from gi.repository import Gdk, Pango, PangoCairo, GdkPixbuf, GObject
/usr/lib/
from gi.repository import AppIndicator3 # pylint: disable=E0611
Traceback (most recent call last):
File "/usr/bin/variety", line 39, in <module>
variety.main()
File "/usr/lib/
Util.
File "/usr/lib/
return (userhome + path[i:]) or '/'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 6: ordinal not in range(128)
Lin-Buo-
/home/林博仁
```
ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: variety 0.6.0-1
ProcVersionSign
Uname: Linux 4.4.0-45-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Nov 17 17:47:16 2016
ExecutablePath: /usr/bin/variety
InterpreterPath: /usr/bin/python2.7
PackageArchitec
ProcCmdline: /usr/bin/python /usr/bin/variety
PythonArgs: ['/usr/
SourcePackage: variety
Title: variety crashed with UnicodeDecodeError in expanduser(): 'ascii' codec can't decode byte 0xe6 in position 6: ordinal not in range(128)
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers video
tags: | removed: need-duplicate-check |
Changed in variety (Ubuntu): | |
importance: | Undecided → Medium |
Looking at https:/ /bugs.python. org/issue18171, it may be better to replace:
os. path.expanduser (u"~/.config/ variety/ ")
with
os. path.expanduser ("~/.config/ variety/ ")
However, I haven't tested this myself, so I can't confirm whether it works.