Closed persmule closed 9 years ago
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 11: ordinal not in range(128)
你没有设置系统语言,而 Danmaku2ASS 的主程序放在了含有特殊字符(如中文)的路径下了。 解决方法有两个:
如果还是无法解决,请发上来 locale
命令的输出。
$ locale LANG=zh_CN.UTF-8 LANGUAGE= LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL=
When convert xml danmaku to ass via danmaku2ass (py2 version) on Debian GNU/Linux Stretch, it reports:
Traceback (most recent call last): File "../danmaku2ass2.py", line 40, in
gettext.install('danmaku2ass', os.path.join(os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0] or 'locale'))), 'locale'))
File "/usr/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 11: ordinal not in range(128)
danmaku2ass (py3 version) works with no problem.