# error: PDF2DSC sentinel: Wrong type argument: arrayp, nil

I am trying to get AUCTeX on Emacs to preview formulas but it doesn't seem to work and when I click preview, it produces the following error:

PDF2DSC sentinel: Wrong type argument: arrayp, nil


I have Emacs, AUCTeX and Ghostscript installed on a Windows 10 machine. Any help would be greatly appreciated.

• You need Ghostscript in your PATH. Easier is to use the binaries provided by TeXlive. If you have c:\path\to\texlive\2016\bin\win32 in your PATH, Emacs should find and use everything it needs there. – Arash Esbati Feb 5 '17 at 7:15