---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
C:\Users\ARGENI~1\AppData\Local\Temp/ipykernel_23184/1704086682.py in <module>
27 col_list = list(range(0, 20)) if 'green' in file_tmp else list(range(0, 19))
28 print(url_tmp)
---> 29 tmp_data = pd.read_csv(url_tmp, sep=',', index_col=False, usecols=col_list,
30 skip_blank_lines=True, error_bad_lines=False, )
31 tmp_data.to_csv(file_tmp, compression='gzip')
~\Anaconda3\envs\python38\lib\site-packages\pandas\util\_decorators.py in wrapper(*args, **kwargs)
309 stacklevel=stacklevel,
310 )
--> 311 return func(*args, **kwargs)
312
313 return wrapper
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\readers.py in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, encoding_errors, dialect, error_bad_lines, warn_bad_lines, on_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)
584 kwds.update(kwds_defaults)
585
--> 586 return _read(filepath_or_buffer, kwds)
587
588
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\readers.py in _read(filepath_or_buffer, kwds)
480
481 # Create the parser.
--> 482 parser = TextFileReader(filepath_or_buffer, **kwds)
483
484 if chunksize or iterator:
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\readers.py in __init__(self, f, engine, **kwds)
809 self.options["has_index_names"] = kwds["has_index_names"]
810
--> 811 self._engine = self._make_engine(self.engine)
812
813 def close(self):
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\readers.py in _make_engine(self, engine)
1038 )
1039 # error: Too many arguments for "ParserBase"
-> 1040 return mapping[engine](self.f, **self.options) # type: ignore[call-arg]
1041
1042 def _failover_to_python(self):
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py in __init__(self, src, **kwds)
49
50 # open handles
---> 51 self._open_handles(src, kwds)
52 assert self.handles is not None
53
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\parsers\base_parser.py in _open_handles(self, src, kwds)
220 Let the readers open IOHandles after they are done with their potential raises.
221 """
--> 222 self.handles = get_handle(
223 src,
224 "r",
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\common.py in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
607
608 # open URLs
--> 609 ioargs = _get_filepath_or_buffer(
610 path_or_buf,
611 encoding=encoding,
~\Anaconda3\envs\python38\lib\site-packages\pandas\io\common.py in _get_filepath_or_buffer(filepath_or_buffer, encoding, compression, mode, storage_options)
315 # Override compression based on Content-Encoding header
316 compression = {"method": "gzip"}
--> 317 reader = BytesIO(req.read())
318 return IOArgs(
319 filepath_or_buffer=reader,
~\Anaconda3\envs\python38\lib\http\client.py in read(self, amt)
470 else:
471 try:
--> 472 s = self._safe_read(self.length)
473 except IncompleteRead:
474 self._close_conn()
~\Anaconda3\envs\python38\lib\http\client.py in _safe_read(self, amt)
611 IncompleteRead exception can be used to detect the problem.
612 """
--> 613 data = self.fp.read(amt)
614 if len(data) < amt:
615 raise IncompleteRead(data, amt-len(data))
~\Anaconda3\envs\python38\lib\socket.py in readinto(self, b)
667 while True:
668 try:
--> 669 return self._sock.recv_into(b)
670 except timeout:
671 self._timeout_occurred = True
~\Anaconda3\envs\python38\lib\ssl.py in recv_into(self, buffer, nbytes, flags)
1239 "non-zero flags not allowed in calls to recv_into() on %s" %
1240 self.__class__)
-> 1241 return self.read(nbytes, buffer)
1242 else:
1243 return super().recv_into(buffer, nbytes, flags)
~\Anaconda3\envs\python38\lib\ssl.py in read(self, len, buffer)
1097 try:
1098 if buffer is not None:
-> 1099 return self._sslobj.read(len, buffer)
1100 else:
1101 return self._sslobj.read(len)
OverflowError: Python int too large to convert to C long