Instapy: <urlopen error [Errno 8] nodename nor servname provided, or not known>

Created on 9 Aug 2017  路  8Comments  路  Source: timgrossmann/InstaPy

Error is thrown when I run docker-quickstart.py through the terminal.
Traceback (most recent call last): File "docker_quickstart.py", line 18, in <module> bot.set_selenium_remote_session(selenium_url='http://selenium:4444/wd/hub') File "/Users/behradkoohywork/Desktop/InstaPy-master/instapy/instapy.py", line 145, in set_selenium_remote_session desired_capabilities=DesiredCapabilities.CHROME) File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__ self.start_session(desired_capabilities, browser_profile) File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 254, in execute response = self.command_executor.execute(driver_command, params) File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 464, in execute return self._request(command_info[0], url, body=data) File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 526, in _request resp = opener.open(request, timeout=self._timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open '_open', req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1227, in http_open return self.do_open(httplib.HTTPConnection, req) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>

Is this an internet connection error or is this a problem in the code? If so, how do I fix?

help wanted question

Most helpful comment

@timgrossmann Some googling suggests its an internet connection error? Maybe I've configured the setup wrong - I'll keep working at it

All 8 comments

@bkoohy Good question, never had that problem.

Maybe someone here had the same problem...

@timgrossmann Some googling suggests its an internet connection error? Maybe I've configured the setup wrong - I'll keep working at it

I have removed that line completely and it works for me.

I'm having the same issue...No issues when I run locally.

I'm running into the same problem, @westondeboer which line are you removing to get it working? Thanks

hi @s2imon I don't know exactly what it will look like in your file, but the set_selenium_remote_session can probably just be removed.

Thanks @westondeboer, tried that and that returns the next problem though. I've basically almost left the used the default docker_quickstart.py. Commenting the line out returns

File "docker_quickstart.py", line 22, in <module>
    bot.login()
  File "/Users/XX/Desktop/promotional/Instagram/InstaPy/instapy/instapy.py", line 162, in login
    if not login_user(self.browser, self.username, self.password, self.switch_language):
  File "/Users/XX/Desktop/promotional/Instagram/InstaPy/instapy/login_util.py", line 8, in login_user
    browser.get('https://www.instagram.com')
AttributeError: 'NoneType' object has no attribute 'get'

Thanks if this means anything at all to you. <3

@bkoohy try to put docker container IP address instead 'selenium' here (selenium_url='http://selenium:4444/wd/hub')
example:
bot.set_selenium_remote_session(selenium_url='http://172.17.0.1:4444/wd/hub')

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ingorichter picture ingorichter  路  3Comments

Naramsim picture Naramsim  路  3Comments

ediooo picture ediooo  路  3Comments

v77v picture v77v  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments