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

visualizer raise e wand.exceptions.PolicyError: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408 #81

Open
eng-khaled1 opened this issue Nov 12, 2020 · 1 comment

Comments

@eng-khaled1
Copy link

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
Copy link
Contributor

Duplicate of HazyResearch/fonduer#170

@HiromuHota HiromuHota marked this as a duplicate of HazyResearch/fonduer#170 Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants