I have a python script that does some things online. Every 10 seconds launchd (OSX 10.11.3 El Capitan) launches a shell script, which calls the python script, which goes online using selenium webdriver.PhantomJS() (or should).
When running the shell script from the terminal, everything succeeds. When running in the configuration described above but with webdriver.Firefox() instead of webdriver.PhantomJS(), everything succeeds. However, when running through launchd -> shell -> python with webdriver.PhantomJS(), it exits with abnormal code: 1.
A simplified version of my code (with all the imports):
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.common.exceptions import NoSuchElementException
d = webdriver.PhantomJS()
d.close()
What am I missing? I would suspect full path names, but I do not explicitly import Firefox() either, and that does work...