You are not logged in.

#1 2013-01-09 14:48:51

adeligen
Member
Registered: 2012-09-26
Posts: 21

[SOLVED] Anki won't start. "Exception: Anki requires a UTF-8 locale."

When starting Anki, I get this output:

Traceback (most recent call last):
  File "/usr/bin/anki", line 5, in <module>
    import aqt
  File "/usr/share/anki/aqt/__init__.py", line 7, in <module>
    import anki.lang
  File "/usr/share/anki/anki/__init__.py", line 12, in <module>
    raise Exception("Anki requires a UTF-8 locale.")
Exception: Anki requires a UTF-8 locale.

I have en_US.UTF-8 UTF-8 and en_US ISO-8859-1 uncommented in my locale.gen file, and have run "#locale-gen", but the out put of "$ locale" is still

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Last edited by adeligen (2013-01-09 15:53:24)

Offline

#2 2013-01-09 15:45:57

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,724
Website

Re: [SOLVED] Anki won't start. "Exception: Anki requires a UTF-8 locale."

Look up 'locale' on the wiki, you've missed something somewhere, and your locale isn't being set correctly.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-01-09 15:52:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: [SOLVED] Anki won't start. "Exception: Anki requires a UTF-8 locale."

what about locale.conf?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2013-01-09 15:52:41

adeligen
Member
Registered: 2012-09-26
Posts: 21

Re: [SOLVED] Anki won't start. "Exception: Anki requires a UTF-8 locale."

Found the answer on the systemd wiki page. I guess I need to run "# localectl set-locale LANG="en_US.utf8"" to get it to configure /etc/locale.conf.
All is working now.

Offline

Board footer

Powered by FluxBB