IndEcol / pymrio

Multi-Regional Input-Output Analysis in Python.
http://pymrio.readthedocs.io/en/latest/
Other
158 stars 71 forks source link

error about the version of files in dictionary files_exio #17

Closed cfrancois7 closed 6 years ago

cfrancois7 commented 7 years ago

In the ioparser.py,

files_exio = dict(
        # exiobase 2.2.2
        A='mrIot_version2.2.2.txt',
        Y='mrFinalDemand_version2.2.2.txt',
        S_fac='mrFactorInputs_version2.2.2.txt',
        S_emissions='mrEmissions_version2.2.2.txt',
        S_materials='mrMaterials_version2.2.2.txt',
        S_resources='mrResources_version2.2.2.txt',
        FY_emissions='mrFDEmissions_version2.2.2.txt',
        FY_materials='mrFDMaterials_version2.2.2.txt',
        charact = 'characterisation_CREEA_version2.2.2.xlsx'
        )

but when we download the last version Exiobase 2, the name of the mrFDEmissions is mrFDEmissions_version2.2.2.txt and not mrFDEmissions_version2.2. An error is raised and the code aborted due to the code:

# check if source exiobase is complete
    _intersect = [val for val in files_exio.values()
                  if val in os.listdir(path)]
    if len(_intersect) != len(files_exio.values()):
        raise ParserError('EXIOBASE files missing')

I proposed to add mrFDEmissions_version2.2.txt in the dictionary to avoid the error.

konstantinstadler commented 6 years ago

New EXIOBASE parser in version 0.3.0 should fix that