ripple/dactyl

More useful error when Prince isn't found

mDuo13 opened this issue · 0 comments

When building PDF, the command to call Prince can fail if the executable isn't available at your PATH as prince or if Prince isn't installed at all. However, the error message in this case is a bit misleading.

On Windows, the error currently looks like this:

  File "C:\Users\Your Username Here\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Instead, the error should report that Prince could not be found and instruct the user to make sure it is installed and their path is set accordingly.