--------------------------------------------------------------------------
gaierror Traceback (most recent call last)
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/urllib3/connection.py in _new_conn(self)
159 conn = connection.create_connection(
--> 160 (self._dns_host, self.port), self.timeout, **extra_kw)
161
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options)
56
---> 57 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
58 af, socktype, proto, canonname, sa = res
~/miniconda3/envs/pvoutput/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags)
747 addrlist = []
--> 748 for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
749 af, socktype, proto, canonname, sa = res
gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
NewConnectionError Traceback (most recent call last)
~/miniconda3/envs/pvoutput/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)
602 body=body, headers=headers,
--> 603 chunked=chunked)
604
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
354 else:
--> 355 conn.request(method, url, **httplib_request_kw)
356
~/miniconda3/envs/pvoutput/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)
1228 """Send a complete request to the server."""
-> 1229 self._send_request(method, url, body, headers, encode_chunked)
1230
~/miniconda3/envs/pvoutput/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)
1274 body = _encode(body, 'body')
-> 1275 self.endheaders(body, encode_chunked=encode_chunked)
1276
~/miniconda3/envs/pvoutput/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)
1223 raise CannotSendHeader()
-> 1224 self._send_output(message_body, encode_chunked=encode_chunked)
1225
~/miniconda3/envs/pvoutput/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)
1015 del self._buffer[:]
-> 1016 self.send(msg)
1017
~/miniconda3/envs/pvoutput/lib/python3.7/http/client.py in send(self, data)
955 if self.auto_open:
--> 956 self.connect()
957 else:
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/urllib3/connection.py in connect(self)
182 def connect(self):
--> 183 conn = self._new_conn()
184 self._prepare_conn(conn)
~/miniconda3/envs/pvoutput/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 0x7f8788ce06d8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
MaxRetryError Traceback (most recent call last)
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
448 retries=self.max_retries,
--> 449 timeout=timeout
450 )
~/miniconda3/envs/pvoutput/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)
640 retries = retries.increment(method, url, error=e, _pool=self,
--> 641 _stacktrace=sys.exc_info()[2])
642 retries.sleep()
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
398 if new_retry.is_exhausted():
--> 399 raise MaxRetryError(_pool, url, error or ResponseError(cause))
400
MaxRetryError: HTTPConnectionPool(host='data.pvoutput.org', port=80): Max retries exceeded with url: /service/r2/getbatchstatus.jsp?sid1=14776&dt=20160426&key=3f784ff6cfa27c44436f88da0c429b410687ad14&sid=68732 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8788ce06d8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
During handling of the above exception, another exception occurred:
ConnectionError Traceback (most recent call last)
<ipython-input-15-4123708f25df> in <module>
6 start_date=START_DATE,
7 end_date=END_DATE,
----> 8 output_filename=OUTPUT_TIMESERIES_FILENAME)
9 except Exception as e:
10 logger.exception('Exception! %s', e)
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in download_multiple_systems_to_disk(self, system_ids, start_date, end_date, output_filename, timezone, min_data_availability, use_get_batch_status_if_available)
604 pv_system_id,
605 date_ranges_to_download,
--> 606 timezone)
607 else:
608 raise ValueError('data_service_url is not set!')
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in _download_multiple_using_get_batch_status(self, output_filename, pv_system_id, date_ranges_to_download, timezone)
675 total_rows = self._download_multiple_worker(
676 output_filename, pv_system_id, dates_to, timezone,
--> 677 use_get_status=False)
678
679 # Re-load data, sort, remove duplicate indicies, append back
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in _download_multiple_worker(self, output_filename, pv_system_id, dates, timezone, use_get_status)
715 else:
716 timeseries = self.get_batch_status(
--> 717 pv_system_id, date_to=date_to_load)
718 if timeseries.empty:
719 _LOG.info('system_id %d: Got empty timeseries back for %s',
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in get_batch_status(self, pv_system_id, date_to, max_retries, **kwargs)
288 pv_system_status_text = self._api_query(
289 service='getbatchstatus', api_params=api_params,
--> 290 use_data_service=True, **kwargs)
291 except NoStatusFound:
292 _LOG.info(
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in _api_query(self, service, api_params, wait_if_rate_limit_exceeded, use_data_service)
781
782 try:
--> 783 response = get_response_func(service, api_params)
784 except Exception as e:
785 _LOG.exception(e)
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/pvoutput.py in _get_data_service_response(self, service, api_params)
844 self.data_service_url, 'service/r2/{}.jsp'.format(service))
845
--> 846 return _get_response(api_url, api_params, headers)
847
848 def _check_api_params(self):
~/dev/python/openclimatefix/solar/pvoutput/pvoutput/utils.py in _get_response(api_url, api_params, headers)
83 full_api_url = '{}?{}'.format(api_url, api_params_str)
84 session = _get_session_with_retry()
---> 85 response = session.get(full_api_url, headers=headers)
86 _LOG.debug(
87 'response: status_code=%d; headers=%s',
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/requests/sessions.py in get(self, url, **kwargs)
544
545 kwargs.setdefault('allow_redirects', True)
--> 546 return self.request('GET', url, **kwargs)
547
548 def options(self, url, **kwargs):
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
531 }
532 send_kwargs.update(settings)
--> 533 resp = self.send(prep, **send_kwargs)
534
535 return resp
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs)
644
645 # Send the request
--> 646 r = adapter.send(request, **kwargs)
647
648 # Total elapsed time of the request (approximately)
~/miniconda3/envs/pvoutput/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
514 raise SSLError(e, request=request)
515
--> 516 raise ConnectionError(e, request=request)
517
518 except ClosedPoolError as e:
ConnectionError: HTTPConnectionPool(host='data.pvoutput.org', port=80): Max retries exceeded with url: /service/r2/getbatchstatus.jsp?sid1=14776&dt=20160426&key=3f784ff6cfa27c44436f88da0c429b410687ad14&sid=68732 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8788ce06d8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))