Browse Source

[fix] set encoding of README.rst explicit in (utf-8) (#2117)

## What does this PR do?

When installing searx on a centos-7 image [1] an encoding exception is raised from

    command: /usr/local/searx/searx-pyenv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/usr/local/searx/searx-src/'"'"'; __file__='"'"'/usr/local/searx/searx-src/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-pidntzkq
         cwd: /usr/local/searx/searx-src/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/searx/searx-src/", line 16, in <module>
        long_description =
      File "/usr/lib64/python3.6/encodings/", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 482: ordinal not in range(128)


## Why is this change important?

README.rst uses non ASCII characters _(pronunciation səːks.)_

## How to test this PR locally?

install searx on a centos-7 image from
Markus Heiser 5 months ago
committed by GitHub
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1

+ 1
- 1 View File

@ -12,7 +12,7 @@ sys.path.insert(0, './searx')
from version import VERSION_STRING
import brand
with open('README.rst') as f:
with open('README.rst', encoding='utf-8') as f:
long_description =
with open('requirements.txt') as f: