-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: google engine with specified "language: it_IT" #384
Labels
bug
Something isn't working
Comments
I have also tried |
return42
added a commit
to return42/searxng
that referenced
this issue
Oct 6, 2021
The key of the dictionary 'searx.data.ENGINES_LANGUAGES' is the *engine name* configured in settings.xml. When multiple engines are configured to use the same engine:: - name: google engine: google ... - name: google italian engine: google language: it ... There exists no entry for ENGINES_LANGUAGES[engine.name] (e.g. 'google italian'). This issue can be solved by recreate the ENGINES_LANGUAGES:: make data.languages But this is nothing an SearXNG admin would like to do, since this only doubles entries in ENGINES_LANGUAGES. With this patch, if engine.name fails, ENGINES_LANGUAGES[engine.engine] is used (e.g. 'google' for the engine named 'google italian'). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Closes: searxng#384
return42
added a commit
to return42/searxng
that referenced
this issue
Oct 6, 2021
The key of the dictionary 'searx.data.ENGINES_LANGUAGES' is the *engine name* configured in settings.xml. When multiple engines are configured to use the same engine:: - name: google engine: google ... - name: google italian engine: google language: it ... There exists no entry for ENGINES_LANGUAGES[engine.name] (e.g. 'google italian'). This issue can be solved by recreate the ENGINES_LANGUAGES:: make data.languages But this is nothing an SearXNG admin would like to do, since this only doubles entries in ENGINES_LANGUAGES. With this patch, if engine.name fails, ENGINES_LANGUAGES[engine.engine] is used (e.g. 'google' for the engine named 'google italian'). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Closes: searxng#384
You can fix the issue by:
Or you approve #386 ... |
return42
added a commit
to return42/searxng
that referenced
this issue
Oct 6, 2021
The key of the dictionary 'searx.data.ENGINES_LANGUAGES' is the *engine name* configured in settings.xml. When multiple engines are configured to use the same origin engine (e.g. `engine: google`):: - name: google engine: google use_mobile_ui: false ... - name: google italian engine: google use_mobile_ui: false language: it ... - name: google mobile ui engine: google shortcut: gomui use_mobile_ui: true There exists no entry for ENGINES_LANGUAGES[engine.name] (e.g. `name: google mobile ui` or `name: google italian`). This issue can be solved by recreate the ENGINES_LANGUAGES:: make data.languages But this is nothing an SearXNG admin would like to do when just configuring additional engines, since this just doubles entries in ENGINES_LANGUAGES and BTW: `make data.languages` has various external requirements which might be not installed or not available, on a production host. With this patch, if engine.name fails, ENGINES_LANGUAGES[engine.engine] is used to get the engine.supported_languages (e.g. `google` for the engine named `google mobile`). For an engine, when there is `language: ...` in the YAML settings, the engine supports only one language, in this case engine.supported_languages should contains this value defined in settings.yml (e.g. `it` for the engine named `google italian`). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Closes: searxng#384
return42
added a commit
to return42/searxng
that referenced
this issue
Oct 7, 2021
The key of the dictionary 'searx.data.ENGINES_LANGUAGES' is the *engine name* configured in settings.xml. When multiple engines are configured to use the same origin engine (e.g. `engine: google`):: - name: google engine: google use_mobile_ui: false ... - name: google italian engine: google use_mobile_ui: false language: it ... - name: google mobile ui engine: google shortcut: gomui use_mobile_ui: true There exists no entry for ENGINES_LANGUAGES[engine.name] (e.g. `name: google mobile ui` or `name: google italian`). This issue can be solved by recreate the ENGINES_LANGUAGES:: make data.languages But this is nothing an SearXNG admin would like to do when just configuring additional engines, since this just doubles entries in ENGINES_LANGUAGES and BTW: `make data.languages` has various external requirements which might be not installed or not available, on a production host. With this patch, if engine.name fails, ENGINES_LANGUAGES[engine.engine] is used to get the engine.supported_languages (e.g. `google` for the engine named `google mobile`). For an engine, when there is `language: ...` in the YAML settings, the engine supports only one language, in this case engine.supported_languages should contains this value defined in settings.yml (e.g. `it` for the engine named `google italian`). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Closes: searxng#384
@paolobasso99 the issue reported is fixed, update your instance and just uncomment .. Lines 604 to 608 in 7246d62
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG
Repository: https://github.com/searxng/searxng
Branch: master
Version: 1.0.0-885-feb2d4dd
How did you install SearXNG?
I used searxng-docker.
What happened?
I tried to set up the Google engine with
language: it_IT
but it crashes.How To Reproduce
Add this engine:
and try to perform a search.
Expected behavior
Results from the google engine with a specified language.
Additional context
I followed the guide in the wiki to add multilingual search to the letter but it does not work.
Technical report
Error
()
searx/engines/google.py:232
get_lang_info
ret_val['params']['hl'] = lang_list.get(lang_country, language)
The text was updated successfully, but these errors were encountered: