Closed danielembc closed 1 year ago
@danielembc Hi, you are probably using the development (Github) version of premise. In any case, it has been fixed (just pull the latest commits from github). Let me know.
@romainsacchi I checked the commit, and reinstalled after. Not working though. Thank you in any case!
Just to be sure, how did you install premise
?
Is it possible for you to print the list what you get when doing pip list
?
I did pip install premise and that was all. The pip list output is below. Thanks.
Package Version
anyio 3.6.1 appdirs 1.4.4 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 asteval 0.9.27 asttokens 2.0.8 astunparse 1.6.3 attrs 22.1.0 Babel 2.10.3 backcall 0.2.0 backports.functools-lru-cache 1.6.4 beautifulsoup4 4.11.1 bleach 5.0.1 boto3 1.26.57 botocore 1.29.57 brightway2 2.4.2 brotlipy 0.7.0 bw-migrations 0.1 bw2analyzer 0.10 bw2calc 1.8.1 bw2data 3.6.5 bw2io 0.8.7 bw2parameters 0.7 cached-property 1.5.2 cchardet 2.1.7 certifi 2022.12.7 cffi 1.15.1 chardet 5.1.0 charset-normalizer 2.1.1 click 8.1.3 click-plugins 1.1.1 cligj 0.7.2 colorama 0.4.5 conda 22.11.1 conda-package-handling 1.9.0 constructive-geometries 0.8.2 contextlib2 0.5.5 contourpy 1.0.5 country-converter 0.7.7 cryptography 37.0.1 cycler 0.11.0 datapackage 1.15.2 debugpy 1.6.3 decorator 5.1.1 defusedxml 0.7.1 docopt 0.6.2 eight 1.0.0 entrypoints 0.4 et-xmlfile 1.0.1 executing 1.1.1 fasteners 0.17.3 fastjsonschema 2.16.2 Fiona 1.8.22 Flask 2.2.2 flit_core 3.7.1 fonttools 4.37.4 future 0.18.2 GDAL 3.5.2 greenlet 2.0.1 idna 3.4 ijson 3.2.0.post0 importlib-metadata 5.0.0 importlib-resources 5.10.0 ipykernel 6.16.0 ipython 8.5.0 ipython-genutils 0.2.0 ipywidgets 8.0.2 isodate 0.6.1 itsdangerous 2.1.2 jedi 0.18.1 Jinja2 3.1.2 jmespath 1.0.1 json5 0.9.10 jsonlines 3.1.0 jsonpointer 2.0 jsonschema 4.16.0 jupyter 1.0.0 jupyter_client 7.4.2 jupyter-console 6.4.4 jupyter_core 4.11.1 jupyter-server 1.21.0 jupyterlab 3.4.8 jupyterlab-pygments 0.2.2 jupyterlab_server 2.15.2 jupyterlab-widgets 3.0.3 kiwisolver 1.4.4 linear-tsv 1.1.0 llvmlite 0.39.1 lxml 4.9.1 MarkupSafe 2.1.1 matplotlib 3.6.1 matplotlib-inline 0.1.6 menuinst 1.4.18 mistune 2.0.4 mrio-common-metadata 0.2.1 munch 2.5.0 munkres 1.1.4 nbclassic 0.4.5 nbclient 0.7.0 nbconvert 7.2.1 nbformat 5.7.0 nest-asyncio 1.5.6 notebook 6.4.12 notebook-shim 0.1.0 numba 0.56.4 numpy 1.23.3 openpyxl 3.0.10 packaging 21.3 pandas 1.5.0 pandocfilters 1.5.0 parso 0.8.3 peewee 3.15.3 pickleshare 0.7.5 Pillow 9.2.0 pip 22.2.2 pkgutil_resolve_name 1.3.10 pluggy 1.0.0 ply 3.11 premise 1.4.1 premise-gwp 0.7 prettytable 3.6.0 prometheus-client 0.15.0 prompt-toolkit 3.0.31 psutil 5.9.2 pure-eval 0.2.2 pycosat 0.6.3 pycountry 22.3.5 pycparser 2.21 Pygments 2.13.0 pyOpenSSL 22.0.0 pypardiso 0.4.1 pyparsing 3.0.9 PyPrind 2.11.2 PyQt5 5.15.7 PyQt5-sip 12.11.0 pyrsistent 0.18.1 PySocks 1.7.1 python-dateutil 2.8.2 python-json-logger 2.0.1 pytz 2022.4 pywin32 303 pywinpty 2.0.8 pyxlsb 1.0.10 PyYAML 6.0 pyzmq 24.0.1 qtconsole 5.3.2 QtPy 2.2.1 requests 2.28.1 rfc3986 2.0.0 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.7 ruamel-yaml-conda 0.15.80 s3transfer 0.6.0 schema 0.7.5 scipy 1.9.1 Send2Trash 1.8.0 setuptools 65.4.1 setuptools-scm 7.0.5 Shapely 1.8.5 sip 6.7.2 six 1.16.0 sniffio 1.3.0 soupsieve 2.3.2.post1 sparse 0.13.0 SQLAlchemy 1.4.46 stack-data 0.5.1 stats-arrays 0.6.5 tableschema 1.19.3 tabulate 0.9.0 tabulator 1.53.5 terminado 0.16.0 tinycss2 1.1.1 toml 0.10.2 tomli 2.0.1 toolz 0.12.0 tornado 6.2 tqdm 4.64.1 traitlets 5.4.0 typing_extensions 4.4.0 unicodecsv 0.14.1 unicodedata2 14.0.0 Unidecode 1.3.6 urllib3 1.26.11 voila 0.3.6 voluptuous 0.13.1 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.4.1 websockets 10.3 Werkzeug 2.2.2 wheel 0.37.1 Whoosh 2.7.4 widgetsnbextension 4.0.3 win-inet-pton 1.1.0 wrapt 1.14.1 wurst 0.3.3 xarray 2023.1.0 xlrd 2.0.1 XlsxWriter 3.0.3 zipp 3.9.0
Hi @romainsacchi, just FYI: same error even after pulling the github commits.
Can you try:
pip uninstall premise
pip install premise --no-cache-dir
Hi @danielembc , has the solution above worked?
Otherwise, premise v.1.4.2
will be available in a few minutes.
You could try installing it and see.
Hi @danielembc , has the solution above worked?
Yes, it worked! Just finished updating it all. Thanks!
Hi all,
I receive the error bellow when using ndb.update_all(). Anything to be updated for that?
Thanks.
File ~\Miniconda3\lib\site-packages\premise\transformation.py:330, in(.0)
313 def get_iam_mapping(
314 self, activity_map: dict, fuels_map: dict, technologies: list
315 ) -> Dict[str, Any]:
316 """
317 Define filter functions that decide which wurst datasets to modify.
318 :param activity_map: a dictionary that contains 'technologies' as keys and activity names as values.
(...)
322 :rtype: dict
323 """
325 return {
326 tech: {
327 "IAM_eff_func": self.find_iam_efficiency_change,
328 "current_eff_func": self.find_fuel_efficiency,
329 "technology filters": activity_map[tech],
--> 330 "fuel filters": fuels_map[tech],
331 }
332 for tech in technologies
333 }
KeyError: 'Nuclear'