budai4medtech / xfetus

xfetus -- A library for ultrasound fetal imaging synthesis using techniques from GANs, transformers, and diffusion models.
6 stars 1 forks source link

NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968 #42

Open mxochicale opened 1 year ago

mxochicale commented 1 year ago

got this one from Qingyu

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-43-cdfa7765dae8> in <cell line: 2>()      1 #!pip install -qqq xfetus----> 2 get_ipython().system('pip install -qqq gdown')      3 #!pip install -qqq accelerate      4 #!pip install -qqq wandb      5 #!pip install -qqq torchmetrics

/usr/local/lib/python3.10/dist-packages/google/colab/_system_commands.py in _run_command(cmd, clear_streamed_output)    165   locale_encoding = locale.getpreferredencoding()    166   if locale_encoding != _ENCODING:--> 167     raise NotImplementedError(    168         'A UTF-8 locale is required. Got {}'.format(locale_encoding)    169     )
NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968

and sorted out wiht

import locale
locale.getpreferredencoding = lambda: "UTF-8"

https://github.com/googlecolab/colabtools/issues/3409