1
0
mirror of https://github.com/searx/searx synced 2024-12-11 08:25:27 +01:00
searx/utils
Markus Heiser f9faafa896
[fix] external_bang - UnicodeDecodeError: 'ascii' codec can't decode (#2043)
Python's default encoding depends on the platform, set (python) default encoding
UTF-8 in uwsgi ini files:

    LANG=C.UTF-8
    LANGUAGE=C.UTF-8
    LC_ALL=C.UTF-8

Error pattern:

    Traceback (most recent call last):
      File "/usr/local/searx/searx-src/searx/webapp.py", line 74, in <module>
        from searx.search import SearchWithPlugins, get_search_query_from_webapp
      File "/usr/local/searx/searx-src/searx/search.py", line 32, in <module>
        from searx.external_bang import get_bang_url
      File "/usr/local/searx/searx-src/searx/external_bang.py", line 13, in <module>
        for bang in json.load(json_file)['bang']:
      File "/usr/lib/python3.8/json/__init__.py", line 293, in load
        return loads(fp.read(),
      File "/usr/lib/python3.8/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
      UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 31341: ordinal not in range(128)

close: https://github.com/asciimoo/searx/issues/2041

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-07-11 12:17:06 +02:00
..
site-python docs: building (PDF) books / build user book 2020-03-21 18:45:38 +01:00
templates [fix] external_bang - UnicodeDecodeError: 'ascii' codec can't decode (#2043) 2020-07-11 12:17:06 +02:00
brand.env build environment: add GIT_BRANCH variable 2020-03-29 16:28:17 +02:00
fabfile.py
fetch_currencies.py
fetch_firefox_version.py [fix] ffox useragent: use Windows NT 10.0 and not Windows NT 10 2020-04-22 00:43:42 +02:00
fetch_languages.py utils/fetch_languages.py: print more meaningfull messages 2020-05-28 15:18:47 +02:00
filtron.sh tooling box: added nginx + polished bash scripts and environment 2020-04-13 11:34:28 +02:00
google_search.py
lib.sh [fix] old images need an initial 'apt update' 2020-04-22 01:11:25 +02:00
lxc-searx.env tooling box: added nginx + polished bash scripts and environment 2020-04-13 11:34:28 +02:00
lxc.sh archlinux: add package 'inetutils' to boilerplate 2020-05-04 16:15:23 +02:00
makefile.include apache: normalize installation (docs and script)s over all distros 2020-04-07 18:31:51 +02:00
makefile.lxc LXC: set LXC_ENV_FOLDER=lxc/$(shell hostname)/ 2020-03-23 18:05:46 +01:00
makefile.python LXC: add virtualenv to LXC_BASE_PACKAGES 2020-04-02 20:27:44 +02:00
makefile.sphinx [fix] buildprocess of the docs by adding sphinx-doc-prebuilds target 2020-06-18 18:44:22 +02:00
morty.sh utils/morty.sh option new-key: set new morty key 2020-04-28 16:54:42 +02:00
searx.sh [fix] markup of auto generated installation instruction (uWSGI part) 2020-06-24 15:15:15 +02:00
standalone_searx.py
update-translations.sh