makinacorpus / django-screamshot

Web pages capture using Django & CasperJS
GNU Lesser General Public License v3.0
106 stars 35 forks source link

Casperjs binary cannot be found in PATH #14

Open pwalsh opened 11 years ago

pwalsh commented 11 years ago

It is on PATH, I can use casperjs via command line.

I have installed casperjs with brew on Mac OS X

Still, screamshot doesn't find casperjs.

"which casperjs" gives:

/usr/local/bin/casperjs

"casperjs" gives:

CasperJS version 1.0.2 at /usr/local/Cellar/casperjs/1.0.2/libexec, using PhantomJS version 1.9.1

Usage: casperjs [options] script.[js|coffee] [script argument [script argument ...]] casperjs [options] test [test path [test path ...]] casperjs [options] selftest

Options:

--help Prints this help --version Prints out CasperJS version

Read the docs http://casperjs.org/

My .bash_profile has:

export PATH=/usr/local/bin:$PATH

leplatrem commented 11 years ago

Strange. That's exactly the way to go... Can you echo your PATH env variable (print os.getenv("PATH")) with the same python as Django ?

I guess we should add a setting to specify the full path to casperjs binary, instead of scanning $PATH...

pwalsh commented 11 years ago

Sure, here is my PATH env variable from the virtualenv of the project:

/Users/paulwalsh/Sites/environments/open-budget/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/Cellar/gettext/0.18.1.1/bin:/usr/local/share/npm/bin:/usr/local/share/python:/Users/paulwalsh/Sites/gcutil-1.8.2:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/Cellar/gettext/0.18.1.1/bin:/usr/local/share/npm/bin:/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

leplatrem commented 11 years ago

I just added a CASPERJS_CMD setting.

I can't say it fixes this bug, but it should help you :)

pwalsh commented 11 years ago

Ok, I'll give it a try.

jonnypolite commented 10 years ago

I had this problem. I had to run a chmod 755 on casperjs before it could be found.

cperezortiz commented 9 years ago

did it work? @pwalsh

pwalsh commented 9 years ago

Blast from the past. I don't remember. I gave up on using django-screamshot.

leplatrem commented 9 years ago

@cperezortiz does casperjs work when you run it in command line ? (i.e. phantomjs is well installed etc. ?)