Skip to content

Instantly share code, notes, and snippets.

@jitvimol
Last active March 8, 2024 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitvimol/35f300050d56827e9ab859492ec4a8ef to your computer and use it in GitHub Desktop.
Save jitvimol/35f300050d56827e9ab859492ec4a8ef to your computer and use it in GitHub Desktop.
fix NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968 #colab #python
import locale
# check exist setting
print(locale.getpreferredencoding())
def getpreferredencoding(do_setlocale = True):
return "UTF-8"file:///D:/Program%20Files/Lepton/resources/app.asar/index.html#
locale.getpreferredencoding = getpreferredencoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment