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

Issue with PATH env #21

Closed
albertzsigovits opened this issue May 28, 2019 · 6 comments
Closed

Issue with PATH env #21

albertzsigovits opened this issue May 28, 2019 · 6 comments

Comments

@albertzsigovits
Copy link

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.

@maaaaz
Copy link
Owner

maaaaz commented May 28, 2019

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

@albertzsigovits
Copy link
Author

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?

@maaaaz
Copy link
Owner

maaaaz commented May 30, 2019

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.

@albertzsigovits
Copy link
Author

albertzsigovits commented May 31, 2019

You rock! Works now.

@ghost
Copy link

ghost commented Oct 2, 2019

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

@jindri-ch
Copy link

For macos use this.

brew tap homebrew/cask
brew cask install phantomjs

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

3 participants