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

TypeError: 'NoneType' object is not iterable #683

Closed
anushakabber opened this issue Mar 5, 2024 · 2 comments
Closed

TypeError: 'NoneType' object is not iterable #683

anushakabber opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@anushakabber
Copy link

Traceback:
`ERROR - Traceback (most recent call last):

File "/src/Extraction.py", line 29, in get_text

paragraphs = textractor(filepath)

File "/src/txtai/pipeline/data/segmentation.py", line 68, in call

value = self.text(value)

File "/src/txtai/pipeline/data/textractor.py", line 57, in text

return self.extract(text)

File "/src/txtai/pipeline/data/textractor.py", line 117, in call

nodes.append(self.process(body))

File "/src/txtai/pipeline/data/textractor.py", line 146, in process

text = "\n".join(self.process(node) for node in children) if self.iscontainer(node, children) else self.text(node)

File "/src/txtai/pipeline/data/textractor.py", line 146, in

text = "\n".join(self.process(node) for node in children) if self.iscontainer(node, children) else self.text(node)

File "/src/txtai/pipeline/data/textractor.py", line 146, in process

text = "\n".join(self.process(node) for node in children) if self.iscontainer(node, children) else self.text(node)

TypeError: 'NoneType' object is not iterable`

The following error is being produced for certain PDFs like the one attached here. The error only showed up after updating from txtai 5.0.0 to 7.0.0. Would greatly appreciate any input on the problem. Please let me know if any further details are required.
Costco.pdf

davidmezzetti added a commit that referenced this issue Mar 5, 2024
@davidmezzetti
Copy link
Member

If you're open to installing from source, please try the latest fix I just checked in.

@davidmezzetti davidmezzetti self-assigned this Mar 5, 2024
@davidmezzetti davidmezzetti added this to the v7.1.0 milestone Mar 5, 2024
@davidmezzetti davidmezzetti added the bug Something isn't working label Mar 5, 2024
@anushakabber
Copy link
Author

Worked! Thank you!!

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

No branches or pull requests

2 participants