Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some csv.gz files break when ReEDS is downloaded as zip #15

Open
bembrin opened this issue Apr 5, 2021 · 0 comments
Open

some csv.gz files break when ReEDS is downloaded as zip #15

bembrin opened this issue Apr 5, 2021 · 0 comments

Comments

@bembrin
Copy link
Collaborator

bembrin commented Apr 5, 2021

This issue has been observed on SM_EasySetup and master.
It appears that the .csv.gz files in ./inputs/variability/* break LDC_prep.py when ReEDS is extracted from a zip file producing this traceback.

ERROR:__main__:Traceback (most recent call last):
  File "inputs_case\LDC_prep.py", line 316, in <module>
    hourly_prep(all_year_load,scenario,static_inputs,basedir)
  File "inputs_case\LDC_prep.py", line 110, in hourly_prep
    load_profiles = pd.read_csv(os.path.join(path_variability, static_inputs, 'load.csv.gz'), index_col=0, float_precision='round_trip')
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\Lib\site-packages\pandas\io\parsers.py", line 688, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\Lib\site-packages\pandas\io\parsers.py", line 454, in _read
    parser = TextFileReader(fp_or_buf, **kwds)
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\Lib\site-packages\pandas\io\parsers.py", line 948, in __init__
    self._make_engine(self.engine)
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\Lib\site-packages\pandas\io\parsers.py", line 1180, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\Lib\site-packages\pandas\io\parsers.py", line 2010, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas\_libs\parsers.pyx", line 537, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas\_libs\parsers.pyx", line 711, in pandas._libs.parsers.TextReader._get_header
  File "pandas\_libs\parsers.pyx", line 905, in pandas._libs.parsers.TextReader._tokenize_rows
  File "pandas\_libs\parsers.pyx", line 2034, in pandas._libs.parsers.raise_parser_error
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\lib\_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\lib\gzip.py", line 463, in read
    if not self._read_gzip_header():
  File "C:\Users\na\ReEDS_OpenAccess\ReEDS_OpenAccess-SM_EasySetup\gams\30.3\GMSPython\lib\gzip.py", line 411, in _read_gzip_header
    raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b've')

7zip is also unable to extract these files manually. ReEDS functioned normally when these files were replaced with files from a working installation of ReEDS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant