Pelican 3.3 Pelican-Quickstart Error: "ValueError: Unknown Locale: UTF-8"
When attempting to use pelican3.3, errors like the following might occur when invoking the "pelican-quickstart" command:
ValueError: unknown locale: UTF-8
Cause
This error is caused by a discrepancy between the assumptions made by Python and the locale settings on your operating system. Python expects the locale name to follow a specific format, which is not always the case.
Solution
1. Set Locale Environment Variables
You can manually set the locale environment variables in your ~/.bash_profile to work around this problem:
export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
2. Choose a Valid Locale
Please note that the fix above assumes English and the United States as the preferred locale. You should choose an appropriate locale from the list provided by locale -a. Generally, select one that ends in UTF-8.
3. Bug Report
An open bug report highlights this issue, indicating that Python makes incorrect assumptions about the format of locale names. Setting the environment variables is a workaround for this problem.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3