I have a program, in which I need to convert a PDF to an image using Image Magick. I do that using the subprocess package:
subprocess
cmd = \'magic
Use the below command to delete the policy file to fix it, If required you can also take backup of this policy file.
rm /etc//policy.xml
for me it was ImageMagick6 and the command was :
sudo rm /etc/ImageMagick-6/policy.xml