Closed janjoppien closed 11 months ago
Hi @janjoppien,
this folder is no longer used in the latest version of premise
.
Could you try to update to 1.5.2
(or 1.5.3
available in a few minutes)?
Hi @romainsacchi,
I uninstalled anaconda, brightway2, activity browser and premise in order to get my problem solved. After installing all the packages again, I still receive an error.
...
update_all()
will skip the following steps:
update_two_wheelers(), update_cars(), and update_buses()
If you want to update these steps, please run them separately afterwards.
KeyError Traceback (most recent call last) Cell In[6], line 1 ----> 1 ndb.update_all()
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/ecoinvent_modification.py:919, in NewDatabase.update_all(self) 913 print( 914 "If you want to update these steps, please run them separately afterwards." 915 ) 917 # self.update_two_wheelers() 918 # self.update_cars() --> 919 self.update_trucks() 920 # self.update_buses() 921 self.update_electricity()
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/ecoinvent_modification.py:825, in NewDatabase.update_trucks(self) 823 for scenario in self.scenarios: 824 if "exclude" not in scenario or "update_trucks" not in scenario["exclude"]: --> 825 trspt = Transport( 826 database=scenario["database"], 827 year=scenario["year"], 828 model=scenario["model"], 829 pathway=scenario["pathway"], 830 iam_data=scenario["iam data"], 831 version=self.version, 832 vehicle_type="truck", 833 relink=False, 834 has_fleet=True, 835 ) 837 trspt.create_vehicle_markets() 838 scenario["database"] = trspt.database
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/transport.py:430, in Transport.init(self, database, iam_data, model, pathway, year, version, relink, vehicle_type, has_fleet) 418 def init( 419 self, 420 database: List[dict], (...) 428 has_fleet: bool, 429 ): --> 430 super().init(database, iam_data, model, pathway, year) 431 self.version = version 432 self.relink = relink
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/transformation.py:176, in BaseTransformation.init(self, database, iam_data, model, pathway, year, cache) 172 self.material_map: Dict[str, Set] = mapping.generate_material_map() 173 self.list_datasets: List[Tuple[str, str, str]] = get_tuples_from_database( 174 self.database 175 ) --> 176 self.ecoinvent_to_iam_loc: Dict[str, str] = { 177 loc: self.geo.ecoinvent_to_iam_location(loc) 178 for loc in self.get_ecoinvent_locs() 179 } 180 self.cache: dict = cache or {}
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/transformation.py:177, in (.0) 172 self.material_map: Dict[str, Set] = mapping.generate_material_map() 173 self.list_datasets: List[Tuple[str, str, str]] = get_tuples_from_database( 174 self.database 175 ) 176 self.ecoinvent_to_iam_loc: Dict[str, str] = { --> 177 loc: self.geo.ecoinvent_to_iam_location(loc) 178 for loc in self.get_ecoinvent_locs() 179 } 180 self.cache: dict = cache or {}
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/geomap.py:148, in Geomap.ecoinvent_to_iam_location(self, location) 143 raise ValueError(f"Could not find equivalent for {location}.") 145 # If not, then we look for IAM regions that contain it 146 iam_location = [ 147 r[1] --> 148 for r in self.geo.within(location) 149 if r[0] == self.model.upper() and r[1] != "World" 150 ] 152 # If not, then we look for IAM regions that intersects with it 153 if len(iam_location) == 0:
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/constructive_geometries/geomatcher.py:196, in Geomatcher.within(self, key, include_self, exclusive, biggestfirst, only) 193 answer = [] + ("RoW") + _("GLO") 194 return list(reversed(answer)) if biggest_first else answer --> 196 faces = self[key] 197 lst = [(k, len(v)) for k, v in possibles.items() if faces.issubset(v)] 198 return self._finish_filter(lst, key, include_self, exclusive, biggest_first)
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/constructive_geometries/geomatcher.py:74, in Geomatcher.getitem(self, key) 72 if key == "RoW" and "RoW" not in self.topology: 73 return set() ---> 74 return self.topology[self._actual_key(key)]
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/constructive_geometries/geomatcher.py:107, in Geomatcher._actual_key(self, key) 104 print("Geomatcher: Used '{}' for '{}'".format(new, key)) 105 return new --> 107 raise KeyError("Can't find this location")
KeyError: "Can't find this location" ...
Apparently there is an issue with the key, but I am not sure about it.
Best regards, Jan
Hi @janjoppien
can you print conda list
?
Hi @romainsacchi here we go:
(ab) MBP-von-Jan-2:~ janjoppien$ conda list packages in environment at /Users/janjoppien/anaconda3/envs/ab:
-- activity-browser 2.8.0 pyhd8ed1ab_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge arrow 1.2.3 pyhd8ed1ab_0 conda-forge asteval 0.9.30 pyhd8ed1ab_0 conda-forge asttokens 2.2.1 pyhd8ed1ab_0 conda-forge astunparse 1.6.3 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge blinker 1.6.2 pyhd8ed1ab_0 conda-forge brightway2 2.4.3 pyhd8ed1ab_0 conda-forge brotli 1.0.9 hb7f2c08_9 conda-forge brotli-bin 1.0.9 hb7f2c08_9 conda-forge brotli-python 1.0.9 py39h7a8716b_9 conda-forge brotlicffi 1.0.9.2 py39h7a8716b_3 conda-forge bw2analyzer 0.10 pyhd8ed1ab_0 conda-forge bw2calc 1.8.2 py39h6e9494a_0 conda-forge bw2data 3.6.6 pyhd8ed1ab_0 conda-forge bw2io 0.8.7 pyhd8ed1ab_0 conda-forge bw2parameters 1.1.0 pyhd8ed1ab_0 conda-forge bw_migrations 0.2 pyhd8ed1ab_0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge ca-certificates 2023.5.7 h8857fd0_0 conda-forge cchardet 2.1.7 py39h7a8716b_4 conda-forge certifi 2023.5.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py39h131948b_3 conda-forge charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge click 8.1.3 unix_pyhd8ed1ab_2 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge comm 0.1.3 pyhd8ed1ab_0 conda-forge constructive_geometries 0.8.2 pyhd8ed1ab_0 conda-forge contextlib2 21.6.0 pyhd8ed1ab_0 conda-forge contourpy 1.1.0 py39h8ee36c8_0 conda-forge country_converter 1.0.0 pyhd8ed1ab_1 conda-forge cryptography 41.0.1 py39he8b0a07_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge datapackage 1.15.2 pyh44b312d_0 conda-forge debugpy 1.6.7 py39h7a8716b_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge dill 0.3.6 pyhd8ed1ab_1 conda-forge docopt 0.6.2 py_1 conda-forge eidl 1.5.1 pyhd8ed1ab_1 conda-forge eight 1.0.1 pyhd8ed1ab_4 conda-forge et_xmlfile 1.1.0 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge fasteners 0.17.3 pyhd8ed1ab_0 conda-forge flask 2.3.2 pyhd8ed1ab_0 conda-forge fonttools 4.40.0 py39hdc70f33_0 conda-forge freetype 2.12.1 h3f81eb7_1 conda-forge future 0.18.3 pyhd8ed1ab_0 conda-forge gettext 0.21.1 h8a4c099_0 conda-forge giflib 5.2.1 hb7f2c08_3 conda-forge glib 2.76.3 h7d26f99_0 conda-forge glib-tools 2.76.3 h7d26f99_0 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge greenlet 2.0.2 py39h840bb9f_1 conda-forge gst-plugins-base 1.22.4 hb5d3a86_0 conda-forge gstreamer 1.22.4 h840fbdc_0 conda-forge icu 72.1 h7336db1_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge ijson 3.2.2 pyhd8ed1ab_0 conda-forge importlib-metadata 6.7.0 pyha770c72_0 conda-forge importlib-resources 5.12.0 pyhd8ed1ab_0 conda-forge importlib_metadata 6.7.0 hd8ed1ab_0 conda-forge importlib_resources 5.12.0 pyhd8ed1ab_0 conda-forge inflate64 0.3.1 py39ha30fb19_3 conda-forge ipykernel 6.23.3 pyh5fb750a_0 conda-forge ipython 8.14.0 pyhd1c38e8_0 conda-forge isodate 0.6.1 pyhd8ed1ab_0 conda-forge itsdangerous 2.1.2 pyhd8ed1ab_0 conda-forge jdcal 1.4.1 py_0 conda-forge jedi 0.18.2 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jsonlines 3.1.0 pyhd8ed1ab_0 conda-forge jsonpointer 2.0 py_0 conda-forge jsonschema 4.17.3 pyhd8ed1ab_0 conda-forge jupyter_client 8.3.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.1 py39h6e9494a_0 conda-forge kiwisolver 1.4.4 py39h92daf61_1 conda-forge krb5 1.20.1 h049b76e_0 conda-forge lcms2 2.15 h2dcdeff_1 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libblas 3.9.0 17_osx64_openblas conda-forge libbrotlicommon 1.0.9 hb7f2c08_9 conda-forge libbrotlidec 1.0.9 hb7f2c08_9 conda-forge libbrotlienc 1.0.9 hb7f2c08_9 conda-forge libcblas 3.9.0 17_osx64_openblas conda-forge libclang 15.0.7 default_hdb78580_2 conda-forge libclang13 15.0.7 default_h953c2e9_2 conda-forge libcxx 16.0.6 hd57cbcb_0 conda-forge libdeflate 1.18 hac1461d_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 11_3_0_h97931a8_31 conda-forge libgfortran5 12.2.0 he409387_31 conda-forge libglib 2.76.3 hc62aa5d_0 conda-forge libiconv 1.17 hac89ed1_0 conda-forge libjpeg-turbo 2.1.5.1 hb7f2c08_0 conda-forge liblapack 3.9.0 17_osx64_openblas conda-forge libllvm14 14.0.6 hc8e404f_3 conda-forge libllvm15 15.0.7 h7001e86_1 conda-forge libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.23 openmp_h429af6e_0 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libpng 1.6.39 ha978bb4_0 conda-forge libpq 15.3 h9dc22bb_1 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsqlite 3.42.0 h58db7d2_0 conda-forge libtiff 4.5.1 hf955e92_0 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libwebp 1.3.1 hc961f54_0 conda-forge libwebp-base 1.3.1 h0dc2134_0 conda-forge libxcb 1.15 hb7f2c08_0 conda-forge libxml2 2.10.4 h554bb67_0 conda-forge libxslt 1.1.37 h5d22bc9_0 conda-forge libzlib 1.2.13 h8a1eda9_5 conda-forge linear-tsv 1.1.0 py_1 conda-forge llvm-openmp 16.0.6 hff08bdf_0 conda-forge llvmlite 0.40.1 py39hc281fc9_0 conda-forge lxml 4.9.2 py39hfbce9ca_0 conda-forge markupsafe 2.1.3 py39hdc70f33_0 conda-forge matplotlib-base 3.7.1 py39hb2f573b_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mkl 2023.1.0 h44ed08c_48681 conda-forge mrio_common_metadata 0.2.1 pyhd8ed1ab_0 conda-forge multiprocess 0.70.14 py39ha30fb19_3 conda-forge multivolumefile 0.2.3 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mysql-common 8.0.33 hc6116ba_0 conda-forge mysql-libs 8.0.33 haa61052_0 conda-forge ncurses 6.4 hf0c8a7f_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge nspr 4.35 hea0b92c_0 conda-forge nss 3.89 h78b00b3_0 conda-forge numba 0.57.1 py39hb7a5252_0 conda-forge numpy 1.23.5 py39hdfa1d0c_0 conda-forge openjpeg 2.5.0 h13ac156_2 conda-forge openpyxl 2.4.11 py_0 conda-forge openssl 3.1.1 h8a1eda9_1 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pandas 1.5.3 py39hecff1ad_1 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pathos 0.3.0 pyhd8ed1ab_0 conda-forge patsy 0.5.3 pyhd8ed1ab_0 conda-forge pcre2 10.40 h1c4e4bc_0 conda-forge peewee 3.16.2 py39hdfbb59c_0 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.5.0 py39he6683de_1 conda-forge pint 0.21 pyhd8ed1ab_0 conda-forge pip 23.1.2 pyhd8ed1ab_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 3.8.0 pyhd8ed1ab_0 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge pox 0.3.2 pyhd8ed1ab_0 conda-forge ppft 1.7.6.6 pyhd8ed1ab_0 conda-forge premise 1.5.3 pyhd8ed1ab_0 conda-forge premise_gwp 2022.07.20 py_0 romainsacchi prettytable 3.7.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.38 pyha770c72_0 conda-forge prompt_toolkit 3.0.38 hd8ed1ab_0 conda-forge psutil 5.9.5 py39ha30fb19_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge py7zr 0.20.5 pyhd8ed1ab_0 conda-forge pybcj 1.0.1 py39ha30fb19_2 conda-forge pybcpy 0.0.17 pyhd8ed1ab_0 conda-forge pycountry 22.3.5 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pycryptodomex 3.18.0 py39hdc70f33_0 conda-forge pygments 2.15.1 pyhd8ed1ab_0 conda-forge pypardiso 0.4.2 pyhd8ed1ab_1 conda-forge pyparsing 3.1.0 pyhd8ed1ab_0 conda-forge pyperclip 1.8.2 pyhd8ed1ab_2 conda-forge pyppmd 1.0.0 py39h7a8716b_1 conda-forge pyprind 2.11.2 py39h6e9494a_1004 conda-forge pyrsistent 0.19.3 py39ha30fb19_0 conda-forge pyside2 5.15.8 py39heedc0ee_2 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.9.16 h709bd14_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.9 3_cp39 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pyxlsb 1.0.10 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py39ha30fb19_5 conda-forge pyzmq 25.1.0 py39hdac9eea_0 conda-forge pyzstd 0.15.9 py39h5705987_0 conda-forge qt-main 5.15.8 h23c57ac_14 conda-forge qt-webengine 5.15.8 h66b1b81_1 conda-forge readline 8.2 h9e318b2_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rfc3986 2.0.0 pyhd8ed1ab_0 conda-forge salib 1.4.7 pyhd8ed1ab_0 conda-forge schema 0.7.5 pyhd8ed1ab_1 conda-forge scipy 1.11.1 py39hded996c_0 conda-forge seaborn 0.12.2 hd8ed1ab_0 conda-forge seaborn-base 0.12.2 pyhd8ed1ab_0 conda-forge setuptools 68.0.0 pyhd8ed1ab_0 conda-forge setuptools-scm 7.1.0 pyhd8ed1ab_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sparse 0.14.0 pyhd8ed1ab_0 conda-forge sqlalchemy 2.0.17 py39hdc70f33_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge stats_arrays 0.6.5 pyhd8ed1ab_0 conda-forge statsmodels 0.14.0 py39h57e1da4_1 conda-forge tableschema 1.17.0 pyh9f0ad1d_0 conda-forge tabulate 0.9.0 pyhd8ed1ab_1 conda-forge tabulator 1.25.1 py_0 conda-forge tbb 2021.9.0 hb8565cd_0 conda-forge texttable 1.6.7 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.2 py39hdc70f33_0 conda-forge tqdm 4.65.0 pyhd8ed1ab_1 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.7.0 hd8ed1ab_0 conda-forge typing_extensions 4.7.0 pyha770c72_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge unicodecsv 0.14.1 py_1 conda-forge unicodedata2 15.0.0 py39ha30fb19_0 conda-forge unidecode 1.3.6 pyhd8ed1ab_0 conda-forge urllib3 2.0.3 pyhd8ed1ab_1 conda-forge voluptuous 0.13.1 pyhd8ed1ab_0 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge werkzeug 2.3.6 pyhd8ed1ab_0 conda-forge wheel 0.40.0 pyhd8ed1ab_0 conda-forge whoosh 2.7.4 py39h6e9494a_7 conda-forge wrapt 1.15.0 py39ha30fb19_0 conda-forge wurst 0.3.3 pyhd8ed1ab_0 conda-forge xarray 2023.6.0 pyhd8ed1ab_0 conda-forge xlrd 2.0.1 pyhd8ed1ab_3 conda-forge xlsxwriter 3.1.2 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.11 h0dc2134_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xz 5.2.6 h775f41a_0 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zipfile-deflate64 0.2.0 py39ha30fb19_3 conda-forge zipp 3.15.0 pyhd8ed1ab_0 conda-forge zstd 1.5.2 hbc0c0cd_6 conda-forge
BR Jan
Hi @janjoppien ,
I have a similar configuration and tried to reproduce your error, which is:
from premise.geomap import Geomap
geo = Geomap(model="image")
geo.ecoinvent_to_iam_location("CN-NWG")
but that worked fine (it returns "CHN" as it should).
So I guess that, even though you have updated the libraries, it is still some older version that this used somehow. Stupid question: have you restarted your notebook's kernel after re-installing everything?
Otherwise, my suggestion is to install premise in a new environment instead of updating in the same one.
Hey @romainsacchi,
very sorry for late response. I installed premise in a new environment and it worked. Thanks for your help.
BR Jan
Hello! This part of my code works perfectly well (decryption key included): ... from premise import * import bw2data
bw2data.projects.set_current("Masterarbeit-Premise") bw2data.databases
clear_cache()
ndb = NewDatabase( scenarios=[ {"model":"image", "pathway":"SSP2-Base", "year":2050}, {"model":"image", "pathway":"SSP2-RCP19", "year":2050}, ], source_db="cutoff391", # <-- name of the database in the BW2 project. Must be a string. source_version="3.8", # <-- version of ecoinvent. Can be "3.5", "3.6", "3.7" or "3.8". Must be a string. key='xxxxxxxxxxxxxxx' # <-- decryption key
to be requested from the library maintainers if you want ot use default scenarios included in
premise
) ... But after running this part of my code, I get an error: ... ndb.update_all() ...
Error: ... ////////////////// MEDIUM AND HEAVY DUTY TRUCKS ////////////////////
FileNotFoundError Traceback (most recent call last) Cell In[25], line 1 ----> 1 ndb.update_all()
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/ecoinvent_modification.py:919, in NewDatabase.update_all(self) 913 print( 914 "If you want to update these steps, please run them separately afterwards." 915 ) 917 # self.update_two_wheelers() 918 # self.update_cars() --> 919 self.update_trucks() 920 # self.update_buses() 921 self.update_electricity()
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/ecoinvent_modification.py:825, in NewDatabase.update_trucks(self) 823 for scenario in self.scenarios: 824 if "exclude" not in scenario or "update_trucks" not in scenario["exclude"]: --> 825 trspt = Transport( 826 database=scenario["database"], 827 year=scenario["year"], 828 model=scenario["model"], 829 pathway=scenario["pathway"], 830 iam_data=scenario["iam data"], 831 version=self.version, 832 vehicle_type="truck", 833 relink=False, 834 has_fleet=True, 835 ) 837 trspt.create_vehicle_markets() 838 scenario["database"] = trspt.database
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/transport.py:430, in Transport.init(self, database, iam_data, model, pathway, year, version, relink, vehicle_type, has_fleet) 418 def init( 419 self, 420 database: List[dict], (...) 428 has_fleet: bool, 429 ): --> 430 super().init(database, iam_data, model, pathway, year) 431 self.version = version 432 self.relink = relink
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/transformation.py:165, in init(self, database, iam_data, model, pathway, year, cache) 163 def new_exchange(exc, location, factor): 164 copied_exc = deepcopy(exc) --> 165 copied_exc["location"] = location 166 return rescale_exchange(copied_exc, factor)
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/geomap.py:50, in init(self, model) 46 data = json.load(stream) 47 return data ---> 50 class Geomap: 51 """ 52 Map ecoinvent locations to IAM regions and vice-versa. 53 54 :ivar model: IAM model (e.g., "remind", "image") 55 56 """ 58 def init(self, model: str) -> None:
File ~/anaconda3/envs/ab/lib/python3.9/site-packages/premise/geomap.py:21, in get_additional_mapping() 18 def load_constants(): 19 """ 20 Load constants from the constants.yaml file. ---> 21 :return: dict 22 """ 23 with open(VARIABLES_DIR / "constants.yaml", "r", encoding="utf-8") as stream: 24 data = yaml.safe_load(stream)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/janjoppien/anaconda3/envs/ab/lib/python3.9/site-packages/premise/data/geomap/missing_definitions.yml' ...
As I updated premise recently, I didn't get the directory 'premise/data/geomap'
Can you help me?
Thanks and best regards, Jan