Problem With System Locale With Fwbackups Application

I’ve got a severe problem and I have no idea how it occurred.

I run fwbackups, which is python application to backup my system of maybe 36TB of data. Normally it runs fine from the KDE menu.

Today I was messing around with the date/time/calender widgit in the system tray.

Then when I ran fwbackups tonight to do a manual backup., I got this message:

Traceback (most recent call last):
File “/usr/share/fwbackups/fwbackups-runapp.pyw”, line 28, in
from fwbackups.const import *
File “/usr/lib/python2.7/site-packages/fwbackups/init.py”, line 47, in
from i18n import encode
File “/usr/lib/python2.7/site-packages/fwbackups/i18n.py”, line 32, in
locale.setlocale(locale.LC_ALL, ‘’)
File “/usr/lib64/python2.7/locale.py”, line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

I have zero idea what this means. The program when run from the menu with run in terminal shows the same error as it does when run directly from the terminal.

I did some research in an attempt to figure out what the problem was, but it’s simply too confusing. I need a step-by-step to determine what is the problem and how I can fix it so python sees the correct locale.

I ran the locale command and I get this:

rhack@localhost:~> locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=“en_US.UTF-8”
LC_NUMERIC=“en_US.UTF-8”
LC_TIME=Default.UTF-8
LC_COLLATE=“en_US.UTF-8”
LC_MONETARY=“en_US.UTF-8”
LC_MESSAGES=“en_US.UTF-8”
LC_PAPER=“en_US.UTF-8”
LC_NAME=“en_US.UTF-8”
LC_ADDRESS=“en_US.UTF-8”
LC_TELEPHONE=“en_US.UTF-8”
LC_MEASUREMENT=“en_US.UTF-8”
LC_IDENTIFICATION=“en_US.UTF-8”
LC_ALL=

That seems to say that there is a blank entry called LC_ALL which is empty and could be the problem. If that is the case, how can I update the locale settings to get rid of it or change it to something acceptable.

This is a real problem for me as my backups cannot be run until this is resolved.

This locale does not exist in glibc. KDE attempts to export locale settings in POSIX format, but it often creates non-exitent names. Revert your changes in KDE.

And how do I do that, as I have no clue? What command needs to be run, what config file updated and how?

As far as I know, everything I did in the date/time widget is back where it was, but the error persists.

You could try deleting ~/.config/plasma-localerc and logging out/logging in.

Converted from vBulletin to discourse. Beware of artefacts.

That file currently has this in it:

rhack@localhost:/Data2/Work> cat ~/.config/plasma-localerc
[Formats]
LANG=en_US.UTF-8
LC_TIME=Default.UTF-8

I can set the LC_ALL with this command:
localectl set-locale LANG=en_US.UTF-8

Then I get this result from running locale"

localhost:/Data2/Work # locale
LANG=en_US.UTF-8
LC_CTYPE=“en_US.UTF-8”
LC_NUMERIC=“en_US.UTF-8”
LC_TIME=“en_US.UTF-8”
LC_COLLATE=“en_US.UTF-8”
LC_MONETARY=“en_US.UTF-8”
LC_MESSAGES=“en_US.UTF-8”
LC_PAPER=“en_US.UTF-8”
LC_NAME=“en_US.UTF-8”
LC_ADDRESS=“en_US.UTF-8”
LC_TELEPHONE=“en_US.UTF-8”
LC_MEASUREMENT=“en_US.UTF-8”
LC_IDENTIFICATION=“en_US.UTF-8”
LC_ALL=en_US.UTF-8

But when I logout and log back in, and run locale, I get this:

rhack@localhost:/Data2/Work> locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=“en_US.UTF-8”
LC_NUMERIC=“en_US.UTF-8”
LC_TIME=Default.UTF-8
LC_COLLATE=“en_US.UTF-8”
LC_MONETARY=“en_US.UTF-8”
LC_MESSAGES=“en_US.UTF-8”
LC_PAPER=“en_US.UTF-8”
LC_NAME=“en_US.UTF-8”
LC_ADDRESS=“en_US.UTF-8”
LC_TELEPHONE=“en_US.UTF-8”
LC_MEASUREMENT=“en_US.UTF-8”
LC_IDENTIFICATION=“en_US.UTF-8”
LC_ALL=

It would seem this is not persistent. How can I get it to be persistent across logouts and reboots?

You are asking the wrong person. It was not me who told you to use localectl.

I’m asking anyone in this thread.

Will someone please give me a step-by-step to correct the issue as stated and make it persistent?

Did you try to do what I suggested? What was the result?

Also remember that my issue is that fwbackups, a python program, does not recognize the locale either when run from terminal or from the KDE menu.

According to the error message, the EC_ALL is not understood when running the locale command:
locale: Cannot set LC_ALL to default locale: No such file or directory

When fwbackups is run from either the terminal or the KDE menu, I get this:

rhack@localhost:/Data2/Work> fwbackups
Traceback (most recent call last):
File “/usr/share/fwbackups/fwbackups-runapp.pyw”, line 28, in
from fwbackups.const import *
File “/usr/lib/python2.7/site-packages/fwbackups/init.py”, line 47, in
from i18n import encode
File “/usr/lib/python2.7/site-packages/fwbackups/i18n.py”, line 32, in
locale.setlocale(locale.LC_ALL, ‘’)
File “/usr/lib64/python2.7/locale.py”, line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

This seems to be the same error:

locale.setlocale(locale.LC_ALL, ‘’)
locale.Error: unsupported locale setting

So how do I get a supported locale setting that python can see and make it persistent across reboots?

I told you above:
~/.config/plasma-localerc has this in it:

[Formats]
LANG=en_US.UTF-8
LC_TIME=Default.UTF-8

Is that incorrect?

OK, I went ahead and deleted that file and logged out and back in.

That fixed it. I have no idea why, but it fixed it.

Thanks.