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

AttributeError in prune_unwanted_sections #667

Closed
Honesty-of-the-Cavernous-Tissue opened this issue Aug 1, 2024 · 3 comments · Fixed by #668
Closed

AttributeError in prune_unwanted_sections #667

Honesty-of-the-Cavernous-Tissue opened this issue Aug 1, 2024 · 3 comments · Fixed by #668
Labels
bug Something isn't working

Comments

@Honesty-of-the-Cavernous-Tissue

trafilatura: 1.12.0

AttributeError: 'NoneType' object has no attribute 'remove'
at here:

elem.getparent().remove(elem)

url = 'http://www.gunbargain.com/'
@adbar
Copy link
Owner

adbar commented Aug 1, 2024

@Honesty-of-the-Cavernous-Tissue I cannot reproduce the bug, the page is offline and the archived version of it does not trigger it. Are you using a particular combination of options?

@Honesty-of-the-Cavernous-Tissue
Copy link
Author

@Honesty-of-the-Cavernous-Tissue I cannot reproduce the bug, the page is offline and the archived version of it does not trigger it. Are you using a particular combination of options?我无法重现该错误,该页面已离线并且其存档版本不会触发该错误。您是否使用特定的选项组合?

here's the content which cause this error that extracted from WARC: https://github.com/Honesty-of-the-Cavernous-Tissue/trafilatura/blob/master/tests/test.html
forgive me for i don't kown if this is a general error.

@adbar adbar added the bug Something isn't working label Aug 1, 2024
@adbar
Copy link
Owner

adbar commented Aug 1, 2024

OK, now I see, thanks!

@adbar adbar linked a pull request Aug 1, 2024 that will close this issue
@adbar adbar closed this as completed in #668 Aug 2, 2024
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