ar-cutpaste
ar-cutpaste copied to clipboard
ConnectionRefusedError: [Errno 61] Connection refused in "python src/main.py --basnet_service_ip="http://172.20.10.2" --photoshop_password 123456"
- Serving Flask app "main" (lazy loading)
- Environment: development
- Debug mode: on INFO:werkzeug: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit) INFO:werkzeug: * Restarting with stat WARNING:werkzeug: * Debugger is active! INFO:werkzeug: * Debugger PIN: 170-737-847 INFO:root:ping INFO:werkzeug:172.20.10.1 - - [15/May/2020 00:27:53] "GET /ping HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request conn.request(method, url, **httplib_request_kw) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output self.send(msg) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send self.connect() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect conn = self._new_conn() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x118fd34a8>: Failed to establish a new connection: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.20.10.2', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x118fd34a8>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2463, in call return self.wsgi_app(environ, start_response) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app response = self.handle_exception(e) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "/Users/pratikparmar/opencv_work/ar_cut_paste/ar-cutpaste/server/src/main.py", line 42, in ping r = requests.get(args.basnet_service_ip, headers={'Host': args.basnet_service_host}) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.20.10.2', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x118fd34a8>: Failed to establish a new connection: [Errno 61] Connection refused')) INFO:root: CUT INFO:root: > sending to BASNet... INFO:werkzeug:172.20.10.1 - - [15/May/2020 00:28:03] "POST /cut HTTP/1.1" 500 - Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request conn.request(method, url, **httplib_request_kw) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output self.send(msg) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send self.connect() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect conn = self._new_conn() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x11a377be0>: Failed to establish a new connection: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.20.10.2', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x11a377be0>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2463, in call return self.wsgi_app(environ, start_response) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app response = self.handle_exception(e) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception reraise(exc_type, exc_value, tb) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "/Users/pratikparmar/opencv_work/ar_cut_paste/ar-cutpaste/server/src/main.py", line 74, in save res = requests.post(args.basnet_service_ip, headers=headers, files=files ) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/Users/pratikparmar/opencv_work/ar_cut_paste/pratik/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.20.10.2', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x11a377be0>: Failed to establish a new connection: [Errno 61] Connection refused')) INFO:root: PASTE INFO:root: > loading image... INFO:root: > grabbing screenshot... INFO:root: > finding projected point... INFO:root:1072, 1101 INFO:root: > sending to photoshop... {'status': 0, 'protocol': 1, 'transaction': 0, 'content_type': <ContentType.SCRIPT: 2>, 'body': b''} INFO:root:Completed in 2.48s INFO:werkzeug:172.20.10.1 - - [15/May/2020 00:28:10] "POST /paste HTTP/1.1" 200 - INFO:werkzeug:172.20.10.2 - - [15/May/2020 00:30:14] "GET / HTTP/1.1" 200 -
close you windows firewall.
@pratikparmar24292 Try following step 2 carefully. it works for me.
same issue
close your windows firewall. @mzwang123 didn't work for me.