From 906b9e7d4c87dcb7ded4ef1248e9569caf408cc7 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 28 Jan 2025 14:21:55 +0100 Subject: [fix] hostnames plugin: AttributeError: 'NoneType' object has no attribute 'netloc' Closes: https://github.com/searxng/searxng/issues/4245 Signed-off-by: Markus Heiser --- searx/engines/dictzone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'searx/engines') diff --git a/searx/engines/dictzone.py b/searx/engines/dictzone.py index 83ab28ff2..bda056edd 100644 --- a/searx/engines/dictzone.py +++ b/searx/engines/dictzone.py @@ -100,5 +100,6 @@ def response(resp) -> EngineResults: if autotranslate.ok and autotranslate.text: item_list.insert(0, results.types.Translations.Item(text=autotranslate.text)) - results.add(results.types.Translations(translations=item_list, url=resp.search_params["url"])) + if item_list: + results.add(results.types.Translations(translations=item_list, url=resp.search_params["url"])) return results -- cgit v1.2.3