From bdbdbe99f400e5cce506206a6e91b4887369e6f0 Mon Sep 17 00:00:00 2001 From: Maxim Sorokin Date: Sun, 11 Nov 2018 13:34:10 +0300 Subject: [PATCH] Fix UTF-8 python encode error When dealing with UTF-8 i've got the error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128) It can be fixed with changing locale from POSIX to C.UTF-8 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4d13116..05d11b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,8 @@ RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x RUN pip3 install selenium RUN pip3 install pyvirtualdisplay +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 ENV APP_HOME /usr/src/app WORKDIR /$APP_HOME