Heroku找不到Chrome二进制文件?

时间:2017-08-01 20:56:52

标签: google-chrome selenium heroku

我在heroku app中遇到以下问题:

2017-08-01 20:54:22 ac744713-8102-4c83-81fc-b4be4786b925 selenium.webdriver.remote.remote_connection[4] DEBUG Finished Request
Traceback (most recent call last):
  File "manage.py", line 89, in <module>
    manager.run()
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "manage.py", line 83, in cron
    d.main()
  File "/app/blackbird/domain/cron.py", line 58, in main
    self.take_screenshots()
  File "/app/blackbird/domain/cron.py", line 208, in take_screenshots
    self.driver = webdriver.Chrome('chromedriver')
  File "/app/.heroku/python/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
    desired_capabilities=desired_capabilities)
  File "/app/.heroku/python/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "/app/.heroku/python/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/app/.heroku/python/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
    self.error_handler.check_response(response)
  File "/app/.heroku/python/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 3.13.0-123-generic x86_64)

即使我添加了Chrome驱动程序和google-chrome buildpacks:

enter image description here

我是否缺少一个让我的应用程序可以使用我的chrome二进制文件的步骤?

0 个答案:

没有答案