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: 'NoneType' object has no attribute 'lower' #40

Open
nvanderperren opened this issue Jan 29, 2024 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'lower' #40

nvanderperren opened this issue Jan 29, 2024 · 0 comments

Comments

@nvanderperren
Copy link

I'm trying to create a wacz from a warc.gz file. I want it to detect pages and create a full text index. This is my command: python3 -m wacz create -f vlaamsekunstcollectie.warc.gz -o vlaamsekunstcollectie_be.wacz --detect-pages --text. The warc.gz file has a size of 15 GB.

I get multiple times this error:

AttributeError: 'NoneType' object has no attribute 'lower'
Error parsing HTML
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/extractors.py", line 108, in parse_doc
    bp_parser.feed(input_str)
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 658, in feed
    self.end_document()
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 461, in end_document
    self.flush_block()
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 540, in flush_block
    if self.last_start_tag.lower() == "title":

AttributeError: 'NoneType' object has no attribute 'lower'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/extractors.py", line 114, in parse_doc
    bp_parser.feed(input_str)
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 658, in feed
    self.end_document()
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 461, in end_document
    self.flush_block()
  File "/opt/homebrew/lib/python3.11/site-packages/boilerpy3/parser.py", line 540, in flush_block
    if self.last_start_tag.lower() == "title":

It succeeds in creating a wacz, but there are no images, although the warc.gz file does show the images.

screenshot of the wacz file:
Screenshot 2024-01-29 at 15 46 58

same page in the warc file:
Screenshot 2024-01-29 at 15 46 51

Not sure if this problem has something to do with a HTML <title> tag, but something is going wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant