Ja próbuje uruchomić ten skrypt:PhantomJS z błędem Selen: Wiadomość wykonywalny „phantomjs” musi być w PATH
https://github.com/Chillee/coursera-dl-all
Jednak skrypt nie na linii session = webdriver.PhantomJS()
z następującym błędem
Traceback (most recent call last):
File "dl_all.py", line 236, in <module>
session = webdriver.PhantomJS()
File "/home/shaan/.local/lib/python2.7/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 51, in __init__
self.service.start()
File "/home/shaan/.local/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 69, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.phantomjs.service.Service object at 0x7f6f632864d0>> ignored
Jak dodać phantomjs do mojej zmiennej PATH? Używam ubuntu 16.04 i instaluję selen przez npm install selenium
.
Czy zainstalowane są phantomjs? –
To powinno być. Czy jest jakikolwiek sposób, aby dwukrotnie sprawdzić? – quantumbutterfly
Czy 'które phantomjs'. Jeśli go nie ma, po prostu przenieś go do/usr/bin lub dowolnego innego miejsca w twojej PATH – pguardiario