visualizer raise e wand.exceptions.PolicyError: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408
eng-khaled1 opened this issue · 1 comments
eng-khaled1 commented
Describe the bug
as described in the max_storage_temp_tutorial i tried to display the candidates as follow :
vis = Visualizer(pdf_path)
# Get a list of candidates that match the FN[10] entity
fp_cands = entity_to_candidates(FP[10], test_cands[0])
# Display a candidate
vis.display_candidates([fp_cands[0]])
but it raises the following :
Error Logs/Screenshots
Traceback (most recent call last):
File "/home/khaled/PycharmProjects/pythonProject2/main.py", line 437, in <module>
vis.display_candidates([fp_cands[0]])
File "/home/khaled/.local/lib/python3.8/site-packages/fonduer/utils/visualizer.py", line 90, in display_candidates
imgs = self.display_boxes(pdf_file, boxes, alternate_colors=True)
File "/home/khaled/.local/lib/python3.8/site-packages/fonduer/utils/visualizer.py", line 60, in display_boxes
img = pdf_to_img(pdf_file, page_num)
File "/home/khaled/.local/lib/python3.8/site-packages/fonduer/utils/visualizer.py", line 168, in pdf_to_img
img = Image(filename=f"{pdf_file}[{page_num - 1}]")
File "/home/khaled/.local/lib/python3.8/site-packages/wand/image.py", line 8293, in __init__
self.read(filename=filename, resolution=resolution,
File "/home/khaled/.local/lib/python3.8/site-packages/wand/image.py", line 8774, in read
self.raise_exception()
File "/home/khaled/.local/lib/python3.8/site-packages/wand/resource.py", line 243, in raise_exception
raise e
wand.exceptions.PolicyError: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408
Environment (please complete the following information):
- OS: [ Ubuntu 20.04]
- PostgreSQL Version: [ 12.0]
- Poppler Utils Version: [ 0.86.1]
- Fonduer Version: [0.8.3]
many thanks
HiromuHota commented
Duplicate of HazyResearch/fonduer#170