I've downloaded and installed PythonMagick for python 2.7, 64 bit Windows 7, from the Unofficial Windows Binaries.

I am trying to run this code (Processor.py)

import PythonMagick

pdf = 'test.pdf'
p = PythonMagick.Image()    
p.density('600')
p.read(pdf)
p.write('doc.jpg')

within this folder (D:\Python Projects\Sheet Music Reader) D:\Python Projects\Sheet Music Reader

However, using that relative pdf path or pdf = "D:\\Python Projects\\Sheet Music Reader" results in this error;

Traceback (most recent call last):
  File "D:/Python Projects/Sheet Music Reader/Processor.py", line 6, in <module>
    p.read(pdf)  
RuntimeError: Magick: PostscriptDelegateFailed `D:\Python Projects\Sheet Music Reader\test.pdf':   
No such file or directory @ error/pdf.c/ReadPDFImage/664

I simply don't understand why it can't find my pdf; it's in the same directory as the python script.

What's causing this error, and how do I fix it?
(I've on the impression that converting pdfs to images in python is a night mare)

Edit
Report