启动 Gramps 时出现 UnicodeDecodeError

启动 Gramps 时出现 UnicodeDecodeError

今天我尝试启动 Gramps 但是它失败并且UnicodeDecodeError退出:

$ gramps
2017-02-18 19:09:05.715: ERROR: grampsgui.py: line 384: 
Gramps failed to start. Please report a bug about this.
This could be because of an error in a (third party) View on startup.
To use another view, don't load a Family Tree, change view, and then load your Family Tree.
You can also change manually the startup view in the gramps.ini file 
by changing the last-view parameter.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gramps/gui/grampsgui.py", line 353, in __startgramps
    Gramps(argparser)
  File "/usr/lib/python2.7/dist-packages/gramps/gui/grampsgui.py", line 252, in __init__
    from . import viewmanager
  File "/usr/lib/python2.7/dist-packages/gramps/gui/viewmanager.py", line 75, in <module>
    from .plug import tool
  File "/usr/lib/python2.7/dist-packages/gramps/gui/plug/__init__.py", line 33, in <module>
    from ._guioptions import make_gui_option, add_gui_options
  File "/usr/lib/python2.7/dist-packages/gramps/gui/plug/_guioptions.py", line 57, in <module>
    from .. import widgets
  File "/usr/lib/python2.7/dist-packages/gramps/gui/widgets/__init__.py", line 28, in <module>
    from .dateentry import *
  File "/usr/lib/python2.7/dist-packages/gramps/gui/widgets/dateentry.py", line 45, in <module>
    from .monitoredwidgets import MonitoredDate
  File "/usr/lib/python2.7/dist-packages/gramps/gui/widgets/monitoredwidgets.py", line 57, in <module>
    from gramps.gen.datehandler import displayer, parser
  File "/usr/lib/python2.7/dist-packages/gramps/gen/datehandler/__init__.py", line 37, in <module>
    from ._datehandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
  File "/usr/lib/python2.7/dist-packages/gramps/gen/datehandler/_datehandler.py", line 48, in <module>
    from ._dateparser import DateParser
  File "/usr/lib/python2.7/dist-packages/gramps/gen/datehandler/_dateparser.py", line 53, in <module>
    from . import _grampslocale
  File "/usr/lib/python2.7/dist-packages/gramps/gen/datehandler/_grampslocale.py", line 217, in <module>
    to_uni(time.strftime('%A',(1,1,1,1,1,1,2,1,1)), codeset), # Wednesday
  File "/usr/lib/python2.7/dist-packages/gramps/gen/constfunc.py", line 67, in conv_to_unicode
    return x if x is None or isinstance(x, UNITYPE) else cuni(x, y) if y else cuni(x)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

我尝试使用另一个值作为LANGUAGE环境变量来运行它,但是不起作用。

Gramps版本是4.0.4-1,Python 2.7.6,Ubuntu 14.04。

我无法进行备份,因为 GUI 无法加载,并且通过控制台创建备份会因相同的错误而失败,所以我不想在没有正确备份的情况下冒险进行更新。

我该做些什么来运行 Gramps,或者至少诊断出问题?

答案1

我找到了一个解决方法:

LC_CTYPE=en_US.UTF-8 gramps

相关内容