yzyio/adidas-multi-session

Anybody getting this error message when trying run?

Closed this issue · 5 comments

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'bin/phantomjs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run.py", line 29, in
run(url)
File "/Users/tpsimopoulos/adidas/bot.py", line 83, in run
driver = webdriver.PhantomJS(executable_path=PHANTOM_JS_LOCATION, service_args=service_args)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 52, in init
self.service.start()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.

Exception ignored in: <bound method Service.del of <selenium.webdriver.phantomjs.service.Service object at 0x102aaf160>>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 163, in del
self.stop()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process'

Windows or Mac? Your phantomJS executable can not be found.

Mac, installed phantomjs through homebrew and it works fine with my other scripts. Just not this one...

You need to put the phantomjs executable in the bin folder, download link is in the readme

sorry to comment on closed, I get this same error on windows 10 phantomjs is in bin.

any solution, sorry if answered elsewhere

you need to put the phantomjs.exe in the bin folder, not in a sub folder. There should be a file called phantomjs.exe in the bin folder