pychromeless icon indicating copy to clipboard operation
pychromeless copied to clipboard

Issues with Python 3.8

Open barunmishra13 opened this issue 4 years ago • 5 comments

Hi - if I setup pychromeless on a lambda instance with Python 3.6 or 3.7 runtimes it works fine. However, on 3.8 it errors out with a message saying that Chrome exited with status 127.

Do not need a fix for it but wanted to document this issue just in case other people have problems with it since for new Lambda machines the default is Python 3.8.

barunmishra13 avatar Oct 01 '20 02:10 barunmishra13

Thanks for posting this, I did a lot of debugging and setting my runtime to 3.7 fixed. Any idea why it is breaking?

yannip1234 avatar Feb 18 '21 01:02 yannip1234

Thanks for posting this, I did a lot of debugging and setting my runtime to 3.7 fixed. Any idea why it is breaking?

I've been trying to solve this on #27 by directly using containers with no luck :( AWS Lambda does not provide a lot of information of the error so I don't know how to proceed, if you have any clue please share! :)

jairovadillo avatar Apr 09 '21 09:04 jairovadillo

I use serverless-chrome with Python 3.8 in AWS Lambda. In my case, I needed to install dependencies, and installing the latest official chrome solves the task.

https://github.com/umihico/docker-selenium-lambda

umihico avatar Apr 16 '21 07:04 umihico

Using Python3.8, I get the following error:

{
  "errorMessage": "Message: Can not connect to the Service chromedriver\n",
  "errorType": "WebDriverException",
  "stackTrace": [
    "  File \"/var/task/src/lambda_function.py\", line 8, in lambda_handler\n    driver = WebDriverWrapper()\n",
    "  File \"/var/task/src/webdriver_wrapper.py\", line 55, in __init__\n    self._driver = webdriver.Chrome(chrome_options=chrome_options)\n",
    "  File \"/var/task/lib/selenium/webdriver/chrome/webdriver.py\", line 61, in __init__\n    self.service.start()\n",
    "  File \"/var/task/lib/selenium/webdriver/common/service.py\", line 88, in start\n    raise WebDriverException(\"Can not connect to the Service %s\" % self.path)\n"
  ]
}

Solution: Use Python 3.7

jweissko avatar Apr 20 '21 06:04 jweissko

Hey, I was hoping to setup code profiling and more in depth monitoring of my lambda but that requires a python version >3.7., pychromeless is breaking over 3.7, Just adding this comment for visibility.

meagher43 avatar Feb 12 '22 11:02 meagher43