Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"locale.Error: unsupported locale setting" when Running Lutris Flatpak #78

Open
julianschacher opened this issue Nov 23, 2019 · 6 comments

Comments

@julianschacher
Copy link
Contributor

When I start the Lutris flatpak using flatpak run net.lutris.Lutris I get the following error:

Traceback (most recent call last):
  File "/app/bin/lutris", line 27, in <module>
    locale.setlocale(locale.LC_ALL, "")
  File "/usr/lib/python3.7/locale.py", line 604, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

My locale is (retrieved using the locale command):

LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

I would've suspected that this is an issue of the Lutris application itself, but if I start the Lutris installed via my package manager, I don't encounter this issue.

I can also circumvent this error by running the Lutris flatpak using the following command: env LC_ALL=en_US.UTF-8 flatpak run net.lutris.Lutris, but that's not a great solution.

@gasinvein
Copy link
Member

Does running flatpak update --subpath=de org.gnome.Platform.Locale prior to launching Lutris help?

@julianschacher
Copy link
Contributor Author

Yup, that fixed my issue. Thanks!

@gasinvein
Copy link
Member

This doesn't look like something specific to Lutris to me. Maybe report it to https://github.com/flatpak/flatpak/issues?

@julianschacher
Copy link
Contributor Author

I'll validate the issue with another app using org.gnome.Platform.Locale and then report it there.

@dreua
Copy link

dreua commented Mar 24, 2020

I'm experiencing the same trying to create a flatpak of pdfarranger/pdfarranger#37. Also python based and my locale is also a mix of en_US and de_DE, workaround works but I'd like to have this fixed for users. It would be great if someone with more background knowledge of flatpak could report this.

@A6GibKm
Copy link
Collaborator

A6GibKm commented Apr 6, 2022

Note that upstream has

try:
    locale.setlocale(locale.LC_ALL, "")
except locale.Error:
    sys.stderr.write("Unsupported locale setting. Fix your locales\n")

idk if this is ok nor if it is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants