---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-37-0b82c58835d2> in <module>
29
30 url = 'https://data.cityofnewyork.us/resource/ifj4-ept5.csv'
---> 31 t = load(url, buffer_size = 100000, selected_columns=['PUlocationID'])
32 t[:3]
<ipython-input-37-0b82c58835d2> in load(endpoint_url, selected_columns, buffer_size, search_term_by_column, **kw)
25 tables.append(t)
26 offset = buffer_size * len(tables)
---> 27 t = f(buffer_url + f'&$offset={offset}', **kw)
28 return pd.concat(tables, sort=False)
29
~/.virtualenvs/crosscompute/lib/python3.6/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision)
676 skip_blank_lines=skip_blank_lines)
677
--> 678 return _read(filepath_or_buffer, kwds)
679
680 parser_f.__name__ = name
~/.virtualenvs/crosscompute/lib/python3.6/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)
422 compression = _infer_compression(filepath_or_buffer, compression)
423 filepath_or_buffer, _, compression, should_close = get_filepath_or_buffer(
--> 424 filepath_or_buffer, encoding, compression)
425 kwds['compression'] = compression
426
~/.virtualenvs/crosscompute/lib/python3.6/site-packages/pandas/io/common.py in get_filepath_or_buffer(filepath_or_buffer, encoding, compression, mode)
193
194 if _is_url(filepath_or_buffer):
--> 195 req = _urlopen(filepath_or_buffer)
196 content_encoding = req.headers.get('Content-Encoding', None)
197 if content_encoding == 'gzip':
/usr/lib64/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
221 else:
222 opener = _opener
--> 223 return opener.open(url, data, timeout)
224
225 def install_opener(opener):
/usr/lib64/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
524 req = meth(req)
525
--> 526 response = self._open(req, data)
527
528 # post-process response
/usr/lib64/python3.6/urllib/request.py in _open(self, req, data)
542 protocol = req.type
543 result = self._call_chain(self.handle_open, protocol, protocol +
--> 544 '_open', req)
545 if result:
546 return result
/usr/lib64/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
502 for handler in handlers:
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
506 return result
/usr/lib64/python3.6/urllib/request.py in https_open(self, req)
1359 def https_open(self, req):
1360 return self.do_open(http.client.HTTPSConnection, req,
-> 1361 context=self._context, check_hostname=self._check_hostname)
1362
1363 https_request = AbstractHTTPHandler.do_request_
/usr/lib64/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1319 except OSError as err: # timeout error
1320 raise URLError(err)
-> 1321 r = h.getresponse()
1322 except:
1323 h.close()
/usr/lib64/python3.6/http/client.py in getresponse(self)
1329 try:
1330 try:
-> 1331 response.begin()
1332 except ConnectionError:
1333 self.close()
/usr/lib64/python3.6/http/client.py in begin(self)
295 # read until we get a non-100 response
296 while True:
--> 297 version, status, reason = self._read_status()
298 if status != CONTINUE:
299 break
/usr/lib64/python3.6/http/client.py in _read_status(self)
256
257 def _read_status(self):
--> 258 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
259 if len(line) > _MAXLINE:
260 raise LineTooLong("status line")
/usr/lib64/python3.6/socket.py in readinto(self, b)
584 while True:
585 try:
--> 586 return self._sock.recv_into(b)
587 except timeout:
588 self._timeout_occurred = True
/usr/lib64/python3.6/ssl.py in recv_into(self, buffer, nbytes, flags)
963 "non-zero flags not allowed in calls to recv_into() on %s" %
964 self.__class__)
--> 965 return self.read(nbytes, buffer)
966 else:
967 return socket.recv_into(self, buffer, nbytes, flags)
/usr/lib64/python3.6/ssl.py in read(self, len, buffer)
825 raise ValueError("Read on closed or unwrapped SSL socket.")
826 try:
--> 827 return self._sslobj.read(len, buffer)
828 except SSLError as x:
829 if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
/usr/lib64/python3.6/ssl.py in read(self, len, buffer)
585 """
586 if buffer is not None:
--> 587 v = self._sslobj.read(len, buffer)
588 else:
589 v = self._sslobj.read(len)
KeyboardInterrupt: