You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a = pdf_page.crop((0, table.bbox[1], page_width, table.bbox[3]))
a.images
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/container.py", line 27, in images
return self.objects.get("image", [])
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/page.py", line 174, in objects
self.bbox)
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 317, in crop_to_bbox
for k,v in objs.items())
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 317, in <genexpr>
for k,v in objs.items())
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 321, in crop_to_bbox
scores = n_points_intersecting_bbox(objs, bbox)
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 281, in n_points_intersecting_bbox
return list(scores)
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 280, in <genexpr>
scores = (obj_inside_bbox_score(obj, bbox) for obj in objs)
File "~/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pdfplumber/utils.py", line 230, in obj_inside_bbox_score
(obj["x0"], obj["top"]),
KeyError: 'x0'
The text was updated successfully, but these errors were encountered:
meldonization
changed the title
KeyError raised when pdf image object has no bounding box information
KeyError raised when pdf image object has no bounding box information #bug
Nov 27, 2018
meldonization
changed the title
KeyError raised when pdf image object has no bounding box information #bug
KeyError raised when pdf image object has no bounding box information
Nov 27, 2018
Reviving an old issue. @meldonization Is this an issue anymore? As of 2 August 2018, pdfplumber version was 0.5.9 and the recent one is 0.5.24 and I suspect the issue may have been resolved. If not, could you please tell how to get the value of table that I can put in the crop() method and test?
image object
Error Msg.
The text was updated successfully, but these errors were encountered: