openENTRANCE / openentrance

Definitions of common terms (variables, regions, etc.) for the openENTRANCE project
http://openentrance.eu
Apache License 2.0
30 stars 49 forks source link

Python version < 3.10 #169

Open EmiFej opened 2 years ago

EmiFej commented 2 years ago

When converting model results to the IAMC format, the openENTRANCE iso_mapping did not convert ISO codes into full country names. Example: "GR" did not translate into "Greece" but rather it gave an error

File "/Users/emirfejzic/opt/miniconda3/envs/IAMC/lib/python3.10/site-packages/pandas/core/indexes/multi.py", line 418, in _verify_integrity
    raise ValueError(
ValueError: Level values must be unique: [nan, nan, nan, nan, nan,....] on level 2

Installing Python 3.9 in another environment solved this issue.

danielhuppmann commented 2 years ago

Thanks for reporting this issue, @EmiFej - not that Python 3.10 is not (yet) listed as a supported Python version in the Readme. Will investigate and get back to you...

willu47 commented 2 years ago

Suggest adding constraint on Python version in the config.yml or requirements.txt to avoid this.

danielhuppmann commented 2 years ago

FWIW, with release 1.4, pyam supports Python 3.10 (see https://github.com/IAMconsortium/pyam/releases/tag/v1.4.0). PRs to make this repository or add explicit version limitations very welcome!