python - WebDriverException: Message: 'phantomjs' executable may have wrong permissions -


running selenium locally on flask. im using phantomjs driver. had path error:

selenium.common.exceptions.webdriverexception: message: 'phantomjs' executable needs in path.  

but after finding out stackoverflow question, learned have pass environment path parameter phantomjs. path have below path phantomjs folder in virtual environment folder.

driver = webdriver.phantomjs(executable_path='/users/myacc/documents/mywebapp/venv/lib/python3.5/site-packages/selenium/webdriver/phantomjs') 

however, new error-code now:

selenium.common.exceptions.webdriverexception: message: 'phantomjs' executable may have wrong permissions. 

here's when check file permissions of path.

total 40  drwxr-xr-x 7 user staff 238 nov 6 00:07 .  drwxr-xr-x 17 user staff 578 nov 6 00:03 ..  -rw-r--r--@ 1 user staff 6148 nov 6 00:07 .ds_store  -rw-r--r-- 1 user staff 787 oct 31 12:27 __init__.py  drwxr-xr-x 5 user staff 170 oct 31 12:27 __pycache__  -rw-r--r-- 1 user staff 2587 oct 31 12:27 service.py  -rw-r--r-- 1 user staff 2934 oct 31 12:27 webdriver.py  

selenium.common.exceptions.webdriverexception: message: 'phantomjs' executable may have wrong permissions.

this mistake, because phantomjs didn't execute permission, long phantomjs - 2.1.1 - linux - x86_64 / bin/phantomjs add execute permissions, chmod u + x phantomjs

hope can you


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -