diff --git a/searx/engines/presearch.py b/searx/engines/presearch.py index 141b292ab..55bf16adb 100644 --- a/searx/engines/presearch.py +++ b/searx/engines/presearch.py @@ -137,7 +137,7 @@ def _get_request_id(query, params): # performs an IP-based geolocation of the user, we don't want that in # SearXNG ;-) - if l.territory: + if l and l.territory: headers['Accept-Language'] = f"{l.language}-{l.territory},{l.language};" "q=0.9,*;" "q=0.5" resp = get(url, headers=headers, timeout=5)