Hello there, I'm not an expert in Python nor Linux, but after some hours spent configurating my Ubuntu on Linux subsystem I believe I've done it the right way. The project is incredibly awesome and I hope it'll keep up and kick ass.
I run into an issue tough and I need some help.
Running python3.5 test.py do some init stuff and then Chrome crashes:
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in
__init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 90, in
__init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 177, in
start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 236, in
execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 192,
in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException:
Message: unknown error:
Chrome failed to start: crashed
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),
platform=Linux 4.4.0-43-Microsoft x86_64)
test.py it's just the chainingExample.py with my credentials and the nogui=True argument.
I downloaded the latest chromedriver (2.31) yet for Linux x64, put it inside the asset folder and chmodded to 777 (for testing purpose).
Is there any chance I can run your fantastic script on this terrific Linux subsystem or should I fall back to Windows?
Thanks in advance.
@iSimonWeb Did you follow all the steps on this Linux guide?
Also, where is your test.py located?
You have to make sure it's at the same location as the quickstart.py, in the root directory of InstaPy
@timgrossmann thanks for the quick response.
Yes I did and my script file is located in the root folder or your cloned repo.
Is there a way to get more info on the occurred exception?
@iSimonWeb Well, you could add a try-catch around the InstaPy call like so:
try:
InstaPy(...)\
.
.
.
except Exception as err:
with open('./logs/err.log', 'w') as err_file:
err_file.write(str(err))
This should give you the error occurred
@timgrossmann no luck, it got me the same error as above:
Message: unknown error: Chrome failed to start: crashed
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Linux 4.4.0-43-Microsoft x86_64)
@iSimonWeb Please try to start Chrome before starting the script.
@timgrossmann you got it man!
I'm quite embarassed since the issue was about a non-launching google-chrome.
Anyway, it was caused by google-chrome itself who's not able to start on WSL (Windows Subsystem for Linux) and I found a solution here using this shim library libudev-stub.
Hope this will help someone other!
Thanks a lot, we made it. 馃槑
@iSimonWeb I am getting the same error even after installing libedev-stub :-(