AI4WA / Docs2KG

Docs2KG: Unified Knowledge Graph Construction from Heterogeneous Documents Assisted by Large Language Models

Home Page:https://docs2kg.ai4wa.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'float' object has no attribute 'strip'

chenggangqcg opened this issue · comments

Traceback (most recent call last):
File "/root/project/docs2kg/pdf2kg.py", line 98, in
layout_kg.create_kg()
File "/root/project/venv/lib/python3.12/site-packages/Docs2KG/kg/pdf_layout_kg.py", line 66, in create_kg
self.link_table_to_context()
File "/root/project/venv/lib/python3.12/site-packages/Docs2KG/kg/pdf_layout_kg.py", line 363, in link_table_to_context
nearby_info_dict = self.link_image_to_tree_node(page_node, nearby_info_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/project/venv/lib/python3.12/site-packages/Docs2KG/kg/pdf_layout_kg.py", line 573, in link_image_to_tree_node
if content.strip() == value["content"].strip():
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'strip'

python version 3.12

i will have a look to fix this.