mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.04k stars 793 forks source link

urllib3.exceptions.MaxRetryError: #632

Open ghost opened 5 years ago

ghost commented 5 years ago

I use command: docker run --network selenium -it -e SELENIUM='http://firefox:4444/wd/hub' -v $(pwd):/app webwhatsapi /bin/bash -c "pip install ./;pip list;python sample/remote.py" TRACEBACK:

Environment {'LANG': 'C.UTF-8', 'PYTHONIOENCODING': 'UTF-8', 'TERM': 'xterm', 'GPG_KEY': 'C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF', 'PYTHON_VERSION': '2.7.16', 'SHLVL': '1', 'PYTHON_PIPVERSION': '19.1.1', 'HOSTNAME': 'c3a437aacdc0', 'SELENIUM': 'http://firefox:4445/wf/hub', 'PWD': '/app', 'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOME': '/root', '': '/usr/local/bin/python'} Traceback (most recent call last): File "sample/remote.py", line 18, in driver = WhatsAPIDriver(profile=profiledir, client='remote', command_executor=os.environ["SELENIUM"]) File "/usr/local/lib/python2.7/site-packages/webwhatsapi/init.py", line 232, in init extra_params File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute response = self.command_executor.execute(driver_command, params) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute return self._request(command_info[0], url, body=data) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/remote_connection.py", line 402, in _request resp = http.request(method, url, body=body, headers=headers) File "/usr/local/lib/python2.7/site-packages/urllib3/request.py", line 72, in request urlopen_kw) File "/usr/local/lib/python2.7/site-packages/urllib3/request.py", line 150, in request_encode_body return self.urlopen(method, url, extra_kw) File "/usr/local/lib/python2.7/site-packages/urllib3/poolmanager.py", line 326, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "/usr/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 670, in urlopen response_kw) File "/usr/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 670, in urlopen response_kw) File "/usr/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 670, in urlopen **response_kw) File "/usr/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python2.7/site-packages/urllib3/util/retry.py", line 399, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='firefox', port=4445): Max retries exceeded with url: /wf/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7ab2302450>: Failed to establish a new connection: [Errno -2] Name or service not known',))

tomatoes-prog commented 2 years ago

same problem here at 2022