maaaaz/webscreenshot

Issue with PATH env

Closed this issue · 6 comments

Got some issue with the PATH env.
I'm trying to make it work under Win7.

set PHANTOMJS_BIN="C:\Program Files\phantomjs"

[WinError 2] The system cannot find the file specified
[ERROR][http://abc.xyz:80] renderer binary could not have been found in your current PATH environment variable, exiting

Tried with explicitly adding -r phantomjs, or chrome, chromium, none of them work.

Hello @albertzsigovits,

  1. Is your phantomjs binary in the PATH variable, such as described here ?
  2. Alternatively can you try to use the --renderer-binary option by specifying the absolute path to your phantomjs binary ?

Best regards

Input:
$ python webscreenshot.py -i web.txt -o web\ -r phantomjs --renderer-binary E:\screen\phantomjs\bin\phantomjs.exe -v

Output:
[INFO][General] 'www.xyz' has been formatted as 'http://www.xyz:80' with supplied overriding options
[+] 1 URLs to be screenshot
[WinError 2] The system cannot find the file specified
[ERROR][http://www.xyz:80] renderer binary could not have been found in your current PATH environment variable, exiting

Why is it still trying to look for a PATH variable when --renderer-binary should take precedence?

It is now normaly fixed in 2fe9986, just make a pip install --upgrade webscreenshot

There were some issues in the way shlex splits Windows paths.

The --renderer-binary option, when specified, always take precedence over PATH.

Cheers.

You rock! Works now.

how can this be done on mac? im having the same problem

For macos use this.

brew tap homebrew/cask
brew cask install phantomjs