-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Running download_oecd for OECDv23 multiple times weirdly renames files within the download folder (with and without overwriting=True). See example below.
I assume there is a problem in the renaming after the extraction of the downloaded zip file here:
pymrio/pymrio/tools/iodownloader.py
Lines 324 to 333 in 7bcaebf
| if version == "v2023": | |
| for file in os.listdir(storage_folder): | |
| absolute_path = os.path.join(storage_folder, file) | |
| os.rename( | |
| os.path.join(storage_folder, file), | |
| os.path.join( | |
| storage_folder, | |
| "ICIO2023_" + file.replace("_SML", ""), | |
| ), | |
| ) |
download_oecd("~/downloads", years="1995-2000")
contents of "~/downloads":
download_log.json
ICIO2023_1995.csv
ICIO2023_1996.csv
ICIO2023_1998.csv
ICIO2023_1997.csv
ICIO2023_1999.csv
ICIO2023_2000.csv
Running it again:
download_oecd("~/downloads", years="1995-2000")
contents of "~/downloads":
download_log.json
ICIO2023_download_log.json
ICIO2023_1996.csv
ICIO2023_ICIO2023_1997.csv
ICIO2023_ICIO2023_1996.csv
ICIO2023_ICIO2023_1999.csv
ICIO2023_ICIO2023_1995.csv
ICIO2023_ICIO2023_1998.csv
ICIO2023_1999.csv
ICIO2023_1996.csv
Metadata
Metadata
Assignees
Labels
No labels