Skip to content
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: woxikon.de synonyme engine #1543

Closed
return42 opened this issue Jul 24, 2022 · 6 comments · Fixed by #1681
Closed

Bug: woxikon.de synonyme engine #1543

return42 opened this issue Jul 24, 2022 · 6 comments · Fixed by #1681
Labels
bug Something isn't working

Comments

@return42
Copy link
Member

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: current master

How did you install SearXNG?

make run

What happened?

ERROR   searx.engines.woxikon.de synon: requests exception (search duration : 0.4816262270014704 s, timeout: 5.0 s) : Client error '404 Not Found' for url 'https://synonyme.woxikon.de/synonyme/foo.php'
For more information check: https://httpstatuses.com/404
Traceback (most recent call last):
  File "searx/search/processors/online.py", line 143, in search
    search_results = self._search_basic(query, params)
  File "searx/search/processors/online.py", line 127, in _search_basic
    response = self._send_http_request(params)
  File "searx/search/processors/online.py", line 96, in _send_http_request
    response = req(params['url'], **request_args)
  File "searx/network/__init__.py", line 165, in get
    return request('get', url, **kwargs)
  File "searx/network/__init__.py", line 96, in request
    return future.result(timeout)
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "searx/network/network.py", line 291, in request
    return await self.call_client(False, method, url, **kwargs)
  File "searx/network/network.py", line 287, in call_client
    raise e
  File "searx/network/network.py", line 274, in call_client
    return Network.patch_response(response, do_raise_for_httperror)
  File "SearXNG/searx/network/network.py", line 247, in patch_response
    raise_for_httperror(response)
  File "searx/network/raise_for_httperror.py", line 72, in raise_for_httperror
    resp.raise_for_status()
  File "local/py3/lib/python3.8/site-packages/httpx/_models.py", line 1508, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://synonyme.woxikon.de/synonyme/foo.php'

How To Reproduce

query: !woxikon.de_synonyme foo

Expected behavior

The URL https://synonyme.woxikon.de/synonyme/foo.php seems valid

Additional context

@allendema could you have a look about the issue? / I cherry picked the engine from your branch in #197

Technical report

Error
  * Error: httpx.HTTPStatusError
  * Percentage: 100
  * Parameters: `('404', 'Not Found', 'synonyme.woxikon.de')`
  * File name: `searx/search/processors/online.py:96`
  * Function: `_send_http_request`
  * Code: `response = req(params['url'], **request_args)`
@return42 return42 added the bug Something isn't working label Jul 24, 2022
@allendema
Copy link
Contributor

The site expects a word in German, so with your query "foo" the site finds nothing.
Same goes for Duden engine !duden amazing.

Try them with: !woxi !duden super and they returns results.

So using raise_for_httperror from https://docs.searxng.org/dev/engine_overview.html#id21 would be an alternative.

@return42
Copy link
Member Author

Hi @allendema, thanks a lot for your hints!

So using raise_for_httperror from https://docs.searxng.org/dev/engine_overview.html#id21 would be an alternative.

Do you like to send a PR? .. otherwise I can do it.

@allendema
Copy link
Contributor

Hi @return42, would appreciate it if you would do that.

return42 added a commit to return42/searxng that referenced this issue Aug 19, 2022
Woxikon expects a word in German, so with query "foo" the site finds nothing and
respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' \
      for url 'https://synonyme.woxikon.de/synonyme/foo.php'

[1] searxng#1543 (comment)

Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this issue Aug 19, 2022
Woxikon expects a word in German, so with query "foo" the site finds nothing and
respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' \
      for url 'https://synonyme.woxikon.de/synonyme/foo.php'

[1] searxng#1543 (comment)

Closes: searxng#1543
Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member Author

@allendema I fixed issue in #1681 .. would you give it a try and give your feedback to the PR / thanks!

return42 added a commit to return42/searxng that referenced this issue Aug 19, 2022
Duden expects a word in German, so with query "amazing" the site finds nothing
and respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' for url\
      'https://www.duden.de/suchen/dudenonline/amazing'

[1] searxng#1543 (comment)

Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member Author

@allendema I'm in a run 😸 .. same with PR #1682 that fixes German duden.

@allendema
Copy link
Contributor

They lgtm! Thanks

return42 added a commit to return42/searxng that referenced this issue Aug 20, 2022
Duden expects a word in German, so with query "amazing" the site finds nothing
and respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' for url\
      'https://www.duden.de/suchen/dudenonline/amazing'

[1] searxng#1543 (comment)

Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this issue Sep 4, 2022
Woxikon expects a word in German, so with query "foo" the site finds nothing and
respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' \
      for url 'https://synonyme.woxikon.de/synonyme/foo.php'

[1] searxng#1543 (comment)

Closes: searxng#1543
Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
vincens2005 pushed a commit to vincens2005/searxng that referenced this issue Nov 14, 2022
Woxikon expects a word in German, so with query "foo" the site finds nothing and
respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' \
      for url 'https://synonyme.woxikon.de/synonyme/foo.php'

[1] searxng#1543 (comment)

Closes: searxng#1543
Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants