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
The input pdf file is :https://arxiv.org/abs/2405.14831
i will have a look to fix this.