Instapy: Can't run Docker

Created on 5 May 2017  路  6Comments  路  Source: timgrossmann/InstaPy

Hi everyone !

I'm facing a problem with docker.

When I'm try to run docker, console prints me :

File "quickstart.py", line 14, in <module> InstaPy(username="***", password="***")\ File "/InstaPy/instapy/instapy.py", line 37, in __init__ self.browser = webdriver.Chrome('./assets/chromedriver', chrome_options=chrome_options) 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: exited abnormally (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.10.0-19-generic x86_64)

I placed the chrome driver into assets folder.

My quickstart.py :

`from instapy import InstaPy

dont_like = ['food', 'girl', 'hot']
ignore_words = ['pizza']
friend_list = ['friend1', 'friend2', 'friend3']

InstaPy(username="", password="")\
.login()\
.set_upper_follower_count(limit = 150) \
.set_do_comment(True, percentage=10) \
.set_comments(['oklm', 'solide!', '茅pais']) \
.set_dont_include(friend_list) \
.set_dont_like(dont_like) \
.set_ignore_if_contains(ignore_words) \
.like_by_tags(['#paris'], amount=100) \
.end()
`

Thank you!

help wanted

Most helpful comment

@VivianSolide
I know that Problem!
Just add this code bevor InstaPy() in your quickstart.py-File:

from pyvirtualdisplay import Display

display = Display(visible=0, size=(800, 800))

display.start()

All 6 comments

@VivianSolide
Local or on server?
If server, how much RAM?

@VivianSolide
I know that Problem!
Just add this code bevor InstaPy() in your quickstart.py-File:

from pyvirtualdisplay import Display

display = Display(visible=0, size=(800, 800))

display.start()

@merlinro Thank you!
if that's the problem, please just add InstaPy(nogui=True)

this will set the script up to use for using on a server. No need to initialise pyvirutaldisplay again

@timgrossmann cool!
I think thats also the solution for this Issue: #230

It worked!
Thanks @merlinro & @timgrossmann :)

@timgrossmann Can I suggest to repeat the info about nogui, in the doc, in the docker section? I've missed it when first trying on docker, and I had to come here to find the solution (I later found out that it was already in the doc).
Or maybe we could also add a quickstart_docker.py that already has the parameter.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulkapoor90 picture rahulkapoor90  路  3Comments

neomh picture neomh  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments

deronsizemore picture deronsizemore  路  3Comments

n0sw34r picture n0sw34r  路  3Comments