tomahim / py-image-dataset-generator

Get a large image dataset with minimal effort by grabbing image through the web and generate new ones by image augmentation.
MIT License
217 stars 41 forks source link

Selenium crash #4

Open maxpastor opened 6 years ago

maxpastor commented 6 years ago

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally After searching on stack overflow for answers, people suggested to add screen and displays attributes to make it work. Stack Question

I haven't dig into your code yet, so I'm asking if you've seen this before and if so how did you solve it ? Thanks

tomahim commented 6 years ago

Maybe by adding these options

    options.add_argument('--disable-extensions')
    options.add_argument('--headless')
    options.add_argument('--disable-gpu')
    options.add_argument('--no-sandbox')

in the following file can solve this issue.

https://github.com/tomahim/py-image-dataset-generator/blob/e5031e7229333b8355b149f9402597179a6b488d/image_grabber/google_grabber.py#L28

I think running selenium headless can limit some issues on plateforms like Linux.

If you can try this and tell me if it solves your issue, it would be great.

I can make a fix with maybe a "--headless" option in the command line API (or even if you want to submit a PR)