fix localization nullpointer exception

This commit is contained in:
plucky 2018-12-26 14:32:28 +08:00
commit 44eefb0727
3 changed files with 18 additions and 1 deletions

View file

@ -27,6 +27,7 @@ http://(deepfacelab-cpu or 127.0.0.1):8888/?token=your token
```
$ docker exec -it deepfacelab-cpu bash
$ cd ../srv/
```
### 5. Use jupyter in deepfacelab-cpu bash
@ -56,3 +57,17 @@ $ cd ../srv/
$ chmod +x main.sh
$ ./main.sh
```
### some error
#### localization.py system_locale is NoneType
```
# system_locale may be nil
system_language = system_locale[0:2] if system_locale is not None else "en"
```
#### NVML Shared Library Not Found
[Install NVIDIA Driver](http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux)
[安装N卡驱动](https://linuxstory.org/how-to-install-latest-nvidia-drivers-in-linux/)

View file

@ -2,6 +2,7 @@ FROM tensorflow/tensorflow:latest-py3
RUN apt-get update -qq -y \
&& apt-get install -y libsm6 libxrender1 libxext-dev python3-tk\
&& apt-get install -y ffmpeg \
&& apt-get install -y git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View file

@ -2,7 +2,8 @@
import locale
system_locale = locale.getdefaultlocale()[0]
system_language = system_locale[0:2]
# system_locale may be nil
system_language = system_locale[0:2] if system_locale is not None else "en"
windows_font_name_map = {
'en' : 'cour',