I'm getting an issue that looks like this when I'm trying to save a relatively large chart. I get this error when using either the node backend or the selenium backend (correctly installed all dependencies according to the readme). What could cause this problem? This only happens on the call to save(summary_graph,'summary_graph.png')
where summary_graph is of type altair.vegalite.v4.api.HConcatChart
.
ConnectionRefusedError Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self)
156 conn = connection.create_connection(
--> 157 (self._dns_host, self.port), self.timeout, **extra_kw
158 )
/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
83 if err is not None:
---> 84 raise err
85
/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
73 sock.bind(source_address)
---> 74 sock.connect(sa)
75 return sock
ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
NewConnectionError Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
671 headers=headers,
--> 672 chunked=chunked,
673 )
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
386 else:
--> 387 conn.request(method, url, **httplib_request_kw)
388
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)
1243 """Send a complete request to the server."""
-> 1244 self._send_request(method, url, body, headers, encode_chunked)
1245
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)
1289 body = _encode(body, 'body')
-> 1290 self.endheaders(body, encode_chunked=encode_chunked)
1291
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)
1238 raise CannotSendHeader()
-> 1239 self._send_output(message_body, encode_chunked=encode_chunked)
1240
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)
1025 del self._buffer[:]
-> 1026 self.send(msg)
1027
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py in send(self, data)
965 if self.auto_open:
--> 966 self.connect()
967 else:
/usr/local/lib/python3.7/site-packages/urllib3/connection.py in connect(self)
183 def connect(self):
--> 184 conn = self._new_conn()
185 self._prepare_conn(conn)
/usr/local/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self)
168 raise NewConnectionError(
--> 169 self, "Failed to establish a new connection: %s" % e
170 )
NewConnectionError: <urllib3.connection.HTTPConnection object at 0x147bf2a90>: Failed to establish a new connection: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
MaxRetryError Traceback (most recent call last)
<ipython-input-147-2a814c35573f> in <module>
----> 1 save(label_summary_graph,'summary_graph.png')
/usr/local/lib/python3.7/site-packages/altair_saver/_core.py in save(chart, fp, fmt, mode, method, **kwargs)
/usr/local/lib/python3.7/site-packages/altair_saver/savers/_saver.py in save(self, fp, fmt)
/usr/local/lib/python3.7/site-packages/altair_saver/savers/_saver.py in mimebundle(self, fmts)
/usr/local/lib/python3.7/site-packages/altair_saver/savers/_selenium.py in _mimebundle(self, fmt)
/usr/local/lib/python3.7/site-packages/altair_saver/savers/_selenium.py in _extract(self, fmt)
/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py in get(self, url)
331 Loads a web page in the current browser session.
332 """
--> 333 self.execute(Command.GET, {'url': url})
334
335 @property
/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params)
317
318 params = self._wrap_value(params)
--> 319 response = self.command_executor.execute(driver_command, params)
320 if response:
321 self.error_handler.check_response(response)
/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/remote_connection.py in execute(self, command, params)
372 data = utils.dump_json(params)
373 url = '%s%s' % (self._url, path)
--> 374 return self._request(command_info[0], url, body=data)
375
376 def _request(self, method, url, body=None):
/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/remote_connection.py in _request(self, method, url, body)
395
396 if self.keep_alive:
--> 397 resp = self._conn.request(method, url, body=body, headers=headers)
398
399 statuscode = resp.status
/usr/local/lib/python3.7/site-packages/urllib3/request.py in request(self, method, url, fields, headers, **urlopen_kw)
78 else:
79 return self.request_encode_body(
---> 80 method, url, fields=fields, headers=headers, **urlopen_kw
81 )
82
/usr/local/lib/python3.7/site-packages/urllib3/request.py in request_encode_body(self, method, url, fields, headers, encode_multipart, multipart_boundary, **urlopen_kw)
169 extra_kw.update(urlopen_kw)
170
--> 171 return self.urlopen(method, url, **extra_kw)
/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py in urlopen(self, method, url, redirect, **kw)
328 response = conn.urlopen(method, url, **kw)
329 else:
--> 330 response = conn.urlopen(method, u.request_uri, **kw)
331
332 redirect_location = redirect and response.get_redirect_location()
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
760 release_conn=release_conn,
761 body_pos=body_pos,
--> 762 **response_kw
763 )
764
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
760 release_conn=release_conn,
761 body_pos=body_pos,
--> 762 **response_kw
763 )
764
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
760 release_conn=release_conn,
761 body_pos=body_pos,
--> 762 **response_kw
763 )
764
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
718
719 retries = retries.increment(
--> 720 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
721 )
722 retries.sleep()
/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
434
435 if new_retry.is_exhausted():
--> 436 raise MaxRetryError(_pool, url, error or ResponseError(cause))
437
438 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=61028): Max retries exceeded with url: /session/cd2aa6c78fe58e790b74bd08e7eb0653/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x147bf2a90>: Failed to establish a new connection: [Errno 61] Connection refused'))