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

E0611: No name '_ElementStringResult' in module 'lxml.etree' #3368

Closed
return42 opened this issue Mar 29, 2024 · 1 comment · Fixed by #3381
Closed

E0611: No name '_ElementStringResult' in module 'lxml.etree' #3368

return42 opened this issue Mar 29, 2024 · 1 comment · Fixed by #3381
Assignees
Labels
bug Something isn't working

Comments

@return42
Copy link
Member

return42 commented Mar 29, 2024

In lxml 5.1.1 the private name _ElementStringResult in module lxml.etree does no longer exists.

This name is imported and used by searx.utils.extract_text(..):

searxng/searx/utils.py

Lines 220 to 221 in f5bb64c

if isinstance(xpath_results, (_ElementStringResult, _ElementUnicodeResult, str, Number, bool)):
return str(xpath_results)

TEST      [pylint] ./searx ./searxng_extra ./tests
************* Module searx.utils
searx/utils.py:21:0: E0611: No name '_ElementStringResult' in module 'lxml.etree' (no-name-in-module)
@dalf
Copy link
Member

dalf commented Apr 7, 2024

For information: this code was written nearly a decade ago, perhaps a clear interface exists now.

return42 added a commit to return42/searxng that referenced this issue Apr 8, 2024
In lxml 5.1.1 the private name `_ElementStringResult` in module `lxml.etree`
does no longer exists.

This code was written nearly a decade ago, its no longer clear what the
intention `_ElementStringResult` and `_ElementUnicodeResult` had been. It can be
assumed that these classes will no longer occur.

Closes: searxng#3368
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit that referenced this issue Apr 8, 2024
In lxml 5.1.1 the private name `_ElementStringResult` in module `lxml.etree`
does no longer exists.

This code was written nearly a decade ago, its no longer clear what the
intention `_ElementStringResult` and `_ElementUnicodeResult` had been. It can be
assumed that these classes will no longer occur.

Closes: #3368
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