1

I want use selenium in pythonanywhere. this is error log in pythonanywhere.

Traceback (most recent call last):
  File "/bin/user_wsgi_wrapper.py", line 154, in __call__
    app_iterator = self.app(environ, start_response)
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/downtownhub/odermysite/minitwit.py", line 409, in ordercolect
    driver = webdriver.Firefox()
  File "/home/downtownhub/odermysite/env/lib/python3.4/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__
    self.service.start()
  File "/home/downtownhub/odermysite/env/lib/python3.4/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: 'geckodriver' executable needs to be in PATH. 

So I added geckodrive file in Path('/home/downtownhub/odermysite/env/bin'). but it happen same error. what can I solve it??

2
  • Hi there, did you upgrade Firefox somehow? selenium shouldn't ask for geckodriver if you're using the standard PythonAnywhere version of firefox... Commented Nov 7, 2016 at 13:46
  • @hwjp no.. I did not upgrade firefox..... if I touch wrong something. Is that change deafult standard in pythonanywhere version of firefox?? imppossible,I will try it Commented Nov 8, 2016 at 8:43

1 Answer 1

3

Ah, I see you're using a virtualenv. PythonAnywhere uses an old version of Firefox (v17) which is not compatible with the latest selenium/geckodriver. Switch back to selenium 2:

./env/bin/pip install "selenium<3"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.