locale.Error: unsupported locale setting

Locale.Error: unsupported locale setting.

The error occurs in the following piece of code:

import locale
locale.setlocale(locale.LC_TIME, ‘ru_RU.UTF-8’)

return self.view_functions[rule.endpoint](** req.view_args)
File “/venv/lib/python3.8/site-packages/flask_login/utils.py”, line 272, in decorated_view
return func (* args, ** kwargs)
File “./app/portfolio/routes.py”, line 97, in get_share_operations
operations = [x.serialize for x in query.all()]
File “./app/portfolio/routes.py”, line 97, in operations = [x.serialize for x in query.all()]
File “./app/models.py”, line 222, in serialize
locale.setlocale (locale.LC_TIME, ‘ru_RU.UTF-8’)
File “/usr/lib/python3.8/locale.py”, line 608, in setlocale
return _setlocale (category, locale)
locale.Error: unsupported locale setting
[pid: 661|app: 0|req: 39/115] () {56 vars in 1390 bytes} [Fri Oct 9 00:37:07 2020] GET / portfolio / get-share-operations / FormFactor% 20Inc => generated 290 bytes in 11 msecs (HTTP / 1.1 500) 3 headers in 113 bytes (1 switches on core 0)

The error occurs when the required locale is not installed on the server. Learn more about how to set the locale on the server.

There is no advertisement on the site! Why do you mean?

Helping people is my hobby. And the developer’s skills allow not to be soared by zero monetization of this site. Although…

If the information helped you, then even from a donation of 40 rubles I will be pleased. Dokin’s a little bit, I’ll buy a latte at a McDuck, remember at whose expense the banquet and karma will be credited to you!

But just leaving a comment of gratitude below will bring me a smile of joy 🙂

And if you want to write all sorts of nasty things with the transition to personalities, do not hesitate either, but usually I send this to spam. I love it when the house is clean.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *