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

Problems with detecting pdftops.exe #154

Open
GijsvandenHoven opened this issue Dec 14, 2022 · 0 comments
Open

Problems with detecting pdftops.exe #154

GijsvandenHoven opened this issue Dec 14, 2022 · 0 comments

Comments

@GijsvandenHoven
Copy link

GijsvandenHoven commented Dec 14, 2022

Hi,

I've been trying to generate eps files through Plotly (on a Windows machine).

To do this, poppler must be installed, and added to the PATH.
I did both of these, but the results stay the same.

Specifically, by modifying plotly to add some prints, I find that Kaleido returns 530: Exporting to EPS format requires the pdftops command(...),
which makes sense if poppler can't be found, and seems to be created from the format == "eps" && !popplerAvailable condition in kaleido.cc.

Looking deeper, for Windows devices, popplerAvailable is set in bool ExecutableExistsInPath, also in kaleido.cc.
This function will check if pdftops.exe is an existing file by appending it to any pathspec in the PATH variable.

What has me defeated is that this really should work, but this function still seems to decide no such executable can be found.

For example, if I ask Windows to find it in the path for me, both 'where' and just entering the executable are successful!.
This even made me realize I already had pdftops available in a different binary folder the whole time before installing poppler.
I was also able to subprocess.Popen pdftops myself, with only specifying pdftops.exe in Python.

My only remaining guesses are

  1. Somehow GetVar("PATH") is failing and returning false, even though I can't seem to find any Error logs anywhere confirming this (nothing on stderr or stdout on plotly's end)
  2. The code that forms the executable path has something going strangely
  3. GetVar or Append or something else from chromium is doing something unexpected

I briefly suspected (2), out of misunderstanding file.Append. Either way, I tried setting my path to poppler's bin both with and without a trailing \, with the same result either way.

I have also tried moving poppler's executable from Program Files to Documents where it is now, to get rid of spaces in my path name. I have also attempted to run with removing the second path (texlive) just in case.

For reference, this is the snippet of strings in 'Path' that points to poppler. This is under 'System Variables'.

There is also C:\texlive\2022\bin\win32 in Path under User Variables, which theoretically could be a detectable pdftops.exe as well?

Is there any chance in the world you have an intuition what is going on here? Maybe seen this before? I would be most grateful.

Thank you for your time.

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

1 participant