It seems you're using Windows. The locale strings are different there. Take a more precise look at the doc:
locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform
On Windows, I think it would be something like:
locale.setlocale(locale.LC_ALL, 'deu_deu')
MSDN has a list of language strings and of country/region strings
Answer from Schnouki on Stack Overflowdatetime - Setting Python locale doesn't work - Stack Overflow
Unable to set locale in my python code
Python - How to set French locale? - Stack Overflow
Rhino 8 - Importing Python 3 Libraries
It seems you're using Windows. The locale strings are different there. Take a more precise look at the doc:
locale.setlocale(locale.LC_ALL, 'de_DE') # use German locale; name might vary with platform
On Windows, I think it would be something like:
locale.setlocale(locale.LC_ALL, 'deu_deu')
MSDN has a list of language strings and of country/region strings
You should not pass an explicit locale to setlocale, it is wrong. Let it find out from the environment. You have to pass it an empty string
import locale
locale.setlocale(locale.LC_ALL, '')
Hi,
That changes things.
You have to customize the startup script and install locales and local-all following these steps: https://azureossd.github.io/2020/01/23/custom-startup-for-nodejs-python/
Source: https://github.com/MicrosoftDocs/azure-docs/issues/51974
Thanks for your support Pierre and Mayank.
Because of the change in the build process on Azure, the deployment no longer happens in a fixed folder.
I used the $APP_PATH variable in the startup script and it seems to be working now.
Thank you for your help.
Locale settings are OS dependent and, at least on *nix systems, might even depend on whether they are installed or not.
This SO post might be a good pointer to what locales to use on Windows systems: https://stackoverflow.com/a/956084/2186184
add this in RobotFramework (at the beginning):
${osName}= Evaluate platform.system() platform
Run keyword if "${osName}"=='Windows' Evaluate locale.setlocale(locale.LC_ALL, 'french') locale
... ELSE Evaluate locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') locale