Tôi đang chạy tập lệnh python thông qua cronjob. Tôi có một môi trường ảo và trong cronjob tôi đang chạy nó thông qua môi trường ảo này. Khi tôi chạy script thường thì phantomJS bắt đầu như nó cần, nhưng chạy nó thông qua một script trong cronjob tôi nhận được lỗi này. Điều gì là thiếu trong cronjob để có thể bắt đầu ảo?Bắt đầu phantomJS từ tập lệnh trong cronjob
Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen
Traceback (most recent call last):
File "/home/scraper/superfish-extension/chrome_3day.py", line 96, in <module>
main()
File "/home/scraper/superfish-extension/chrome_3day.py", line 73, in main
browser = use_phantomjs()
File "/home/scraper/superfish-extension/chrome.py", line 81, in use_phantomjs
browser = webdriver.PhantomJS()
File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 50, in __init__
self.service.start()
File "/home/scraper/.virtualenvs/superfish/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py", line 69, in start
raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen
Tại sao mã chỉ này trả lời làm việc? Cần giải thích – ppperry