Skip to content

Commit

Permalink
Fix UTF-8 python encode error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MaxSor authored Nov 11, 2018
1 parent ab9b555 commit bdbdbe9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bdbdbe9

Please sign in to comment.