iiasa / message_ix

The integrated assessment and energy systems model MESSAGEix
https://docs.messageix.org
Apache License 2.0
116 stars 152 forks source link

reinstalled MESSAGE-IX 3.4 version but still getting new errors; KeyError: “[ GWP ]” , DefinitionSyntaxError: Could not add Context ARGGWP100 relation on line ‘6’ #589

Open PelinaP opened 2 years ago

PelinaP commented 2 years ago

My code run smoothly and suddenly had errors related to software. I successfully reinstalled the message-ix version 3.4 and in the anaconda prompt terminal, it saved in a specific directory. However, after I run my model. I get the error KeyError: “[ GWP ]” and DefinitionSyntaxError: Could not add Context ARGGWP100 relation on line ‘6’

at beginning of code. Please check image Screen Shot 2022-04-26 at 7 39 07 PM Screen Shot 2022-04-26 at 7 39 00 PM Screen Shot 2022-04-26 at 7 38 45 PM

@LauWien kindly assist me with this

PelinaP commented 2 years ago

@LauWien kindly assist with above question

khaeru commented 2 years ago

@PelinaP, please:

PelinaP commented 2 years ago

This my first part of code:

load required packages import itertools import pandas as pd

import matplotlib.pyplot as plt %matplotlib inline plt.style.use('ggplot')

import ixmp as ix import message_ix

from message_ix.utils import make_df from tools import Plots

After running the above code cell, I get these two errors.

KeyError: “[ GWP ]” DefinitionSyntaxError: Could not add Context ARGGWP100 relation on line ‘6’

khaeru commented 2 years ago

Include the output of message-ix show-versions. Without this information, we will be unable to diagnose your issue or help you.

PelinaP commented 2 years ago

This my first part of code:

load required packages import itertools import pandas as pd

import matplotlib.pyplot as plt %matplotlib inline plt.style.use('ggplot')

import ixmp as ix import message_ix

from message_ix.utils import make_df from tools import Plots

After running the above code cell, I get these two errors.

The output of message-ix 3.4 are as follows; KeyError: “[ GWP ]” DefinitionSyntaxError: Could not add Context ARGGWP100 relation on line ‘6

\Traceback (most recent call last):

File "C:\Users\energy\anaconda3\lib\site-packages\pint\context.py", line 324, in from_definition dst = to_base_func(relation.dst)

File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 770, in get_dimensionality return self._get_dimensionality(input_units)

File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 787, in _get_dimensionality self._get_dimensionality_recurse(input_units, 1, accumulator)

File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 802, in _get_dimensionality_recurse reg = self._dimensions[key]

KeyError: '[_GWP]'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "C:\Users\energy\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3444, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "C:\Users\energy\AppData\Local\Temp/ipykernel_11672/3332267660.py", line 10, in import message_ix

File "C:\Users\energy\anaconda3\lib\site-packages\message_ix__init__.py", line 10, in from .reporting import Reporter

File "C:\Users\energy\anaconda3\lib\site-packages\message_ix\reporting__init__.py", line 16, in from .pyam import collapse_message_cols

File "C:\Users\energy\anaconda3\lib\site-packages\message_ix\reporting\pyam.py", line 4, in from genno.compat.pyam import util

File "C:\Users\energy\anaconda3\lib\site-packages\genno\compat\pyam__init__.py", line 2, in import pyam # noqa: F401

File "C:\Users\energy\anaconda3\lib\site-packages\pyam__init__.py", line 12, in from pyam.core import *

File "C:\Users\energy\anaconda3\lib\site-packages\pyam\core.py", line 66, in from pyam._ops import _op_data

File "C:\Users\energy\anaconda3\lib\site-packages\pyam_ops.py", line 5, in from iam_units import registry

File "C:\Users\energy\anaconda3\lib\site-packages\iam_units__init__.py", line 18, in registry.load_definitions(str(Path(file).parent / "data" / "definitions.txt"))

File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 650, in load_definitions loaderfunc(definition)

File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 1629, in _load_context self.add_context(Context.from_definition(cd, self.get_dimensionality))

File "C:\Users\energy\anaconda3\lib\site-packages\pint\context.py", line 331, in from_definition raise DefinitionSyntaxError(

File "", line 6

DefinitionSyntaxError: Could not add Context AR6GWP100 relation on line '6'

PLEASE ASSIST AS IT CANNOT SOLVE

PelinaP commented 2 years ago

@LauWien I have made changes here. Kindly asking if you can be of help on this questions.

khaeru commented 2 years ago

@PelinaP it seems you did not read or understand my earlier comment, here: https://github.com/iiasa/message_ix/issues/589#issuecomment-1110842795

  1. You tagged a specific maintainer, again.
  2. You still have not given the output of message-ix show-versions.

Please do us the kind favour of reading and understanding. We can not help you until you do (2) and stop doing (1).

PelinaP commented 2 years ago

Output of message-ix show-versions (base) C:\Users\energy>message-ix show-versions Traceback (most recent call last): File "C:\Users\energy\anaconda3\lib\site-packages\pint\context.py", line 324, in from_definition dst = to_base_func(relation.dst) File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 770, in get_dimensionality return self._get_dimensionality(input_units) File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 787, in _get_dimensionality self._get_dimensionality_recurse(input_units, 1, accumulator) File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 802, in _get_dimensionality_recurse reg = self._dimensions[key] KeyError: '[_GWP]'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\energy\anaconda3\Scripts\message-ix-script.py", line 5, in from message_ix.cli import main File "C:\Users\energy\anaconda3\lib\site-packages\message_ix__init.py", line 10, in from .reporting import Reporter File "C:\Users\energy\anaconda3\lib\site-packages\message_ix\reporting__init.py", line 16, in from .pyam import collapse_message_cols File "C:\Users\energy\anaconda3\lib\site-packages\message_ix\reporting\pyam.py", line 4, in from genno.compat.pyam import util File "C:\Users\energy\anaconda3\lib\site-packages\genno\compat\pyam__init.py", line 2, in import pyam # noqa: F401 File "C:\Users\energy\anaconda3\lib\site-packages\pyam\init__.py", line 12, in from pyam.core import * File "C:\Users\energy\anaconda3\lib\site-packages\pyam\core.py", line 66, in from pyam._ops import _op_data File "C:\Users\energy\anaconda3\lib\site-packages\pyam_ops.py", line 5, in from iam_units import registry File "C:\Users\energy\anaconda3\lib\site-packages\iam_units\init__.py", line 18, in registry.load_definitions(str(Path(file__).parent / "data" / "definitions.txt")) File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 650, in load_definitions loaderfunc(definition) File "C:\Users\energy\anaconda3\lib\site-packages\pint\registry.py", line 1629, in _load_context self.add_context(Context.from_definition(cd, self.get_dimensionality)) File "C:\Users\energy\anaconda3\lib\site-packages\pint\context.py", line 331, in from_definition raise DefinitionSyntaxError( File "", line 6 pint.errors.DefinitionSyntaxError: Could not add Context AR6GWP100 relation on line '6'

(base) C:\Users\energy>

khaeru commented 2 years ago

Thank you. Please then give the output of pip list and conda list on the command line.

PelinaP commented 2 years ago

pip list Package Version


alabaster 0.7.12 anaconda-client 1.9.0 anaconda-navigator 2.1.1 anaconda-project 0.10.1 anyio 2.2.0 appdirs 1.4.4 argh 0.26.2 argon2-cffi 20.1.0 arrow 0.13.1 asn1crypto 1.4.0 astroid 2.6.6 astropy 4.3.1 async-generator 1.10 atomicwrites 1.4.0 attrs 21.2.0 autopep8 1.5.7 Babel 2.9.1 backcall 0.2.0 backports.functools-lru-cache 1.6.4 backports.shutil-get-terminal-size 1.0.0 backports.tempfile 1.0 backports.weakref 1.0.post1 bcrypt 3.2.0 beautifulsoup4 4.10.0 binaryornot 0.4.4 bitarray 2.3.0 bkcharts 0.2 black 19.10b0 bleach 4.0.0 bokeh 2.4.1 boto 2.49.0 boto3 1.21.34 botocore 1.24.34 Bottleneck 1.3.2 brotlipy 0.7.0 cached-property 1.5.2 cchardet 2.1.7 certifi 2021.10.8 cffi 1.14.6 chardet 4.0.0 charset-normalizer 2.0.4 click 8.0.3 cloudpickle 2.0.0 clyent 1.2.2 colorama 0.4.4 comtypes 1.1.10 conda 4.12.0 conda-build 3.21.6 conda-content-trust 0+unknown conda-pack 0.7.0 conda-package-handling 1.8.1 conda-repo-cli 1.0.4 conda-token 0.3.0 conda-verify 3.4.2 contextlib2 0.6.0.post1 cookiecutter 1.7.2 cryptography 3.4.8 cycler 0.10.0 Cython 0.29.24 cytoolz 0.11.0 daal4py 2021.3.0 dask 2021.10.0 datapackage 1.15.2 debugpy 1.4.1 decorator 5.1.0 defusedxml 0.7.1 descartes 1.1.0 diff-match-patch 20200713 distributed 2021.10.0 docutils 0.17.1 entrypoints 0.3 et-xmlfile 1.1.0 fastcache 1.1.0 filelock 3.3.1 flake8 3.9.2 Flask 1.1.2 fonttools 4.25.0 fsspec 2021.10.1 future 0.18.2 genno 1.10.0 gevent 21.8.0 glob2 0.7 greenlet 1.1.1 h5py 3.2.1 HeapDict 1.0.1 html5lib 1.1 iam-units 2021.11.12 idna 3.2 ijson 3.1.3 imagecodecs 2021.8.26 imageio 2.9.0 imagesize 1.2.0 importlib-metadata 4.8.1 inflection 0.5.1 iniconfig 1.1.1 intervaltree 3.1.0 ipykernel 6.4.1 ipython 7.29.0 ipython-genutils 0.2.0 ipywidgets 7.6.5 isodate 0.6.1 isort 5.9.3 itsdangerous 2.0.1 ixmp 3.4.0 jdcal 1.4.1 jedi 0.18.0 Jinja2 2.11.3 jinja2-time 0.2.0 jmespath 1.0.0 joblib 1.1.0 JPype1 1.3.0 json5 0.9.6 jsonlines 3.0.0 jsonpointer 2.0 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 6.1.12 jupyter-console 6.4.0 jupyter-core 4.8.1 jupyter-server 1.4.1 jupyterlab 3.2.1 jupyterlab-pygments 0.1.2 jupyterlab-server 2.8.2 jupyterlab-widgets 1.0.0 keyring 23.1.0 kiwisolver 1.3.1 lazy-object-proxy 1.6.0 libarchive-c 2.9 linear-tsv 1.1.0 llvmlite 0.37.0 locket 0.2.1 lxml 4.6.3 MarkupSafe 1.1.1 matplotlib 3.4.3 matplotlib-inline 0.1.2 mccabe 0.6.1 menuinst 1.4.18 message-ix 3.4.0 mistune 0.8.4 mizani 0.7.3 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 mock 4.0.3 more-itertools 8.10.0 mpmath 1.2.1 msgpack 1.0.2 multipledispatch 0.6.0 munkres 1.1.4 mypy-extensions 0.4.3 navigator-updater 0.2.1 nbclassic 0.2.6 nbclient 0.5.3 nbconvert 6.1.0 nbformat 5.1.3 nest-asyncio 1.5.1 networkx 2.6.3 nltk 3.6.5 nose 1.3.7 notebook 6.4.5 numba 0.54.1 numexpr 2.7.3 numpy 1.20.3 numpydoc 1.1.0 olefile 0.46 openpyxl 3.0.9 packaging 21.0 palettable 3.3.0 pandas 1.3.4 pandocfilters 1.4.3 paramiko 2.7.2 parso 0.8.2 partd 1.2.0 path 16.0.0 pathlib2 2.3.6 pathspec 0.7.0 patsy 0.5.2 pep8 1.7.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 8.4.0 Pint 0.19 pip 21.2.4 pkginfo 1.7.1 plotnine 0.8.0 pluggy 0.13.1 ply 3.11 poyo 0.5.0 prometheus-client 0.11.0 prompt-toolkit 3.0.20 psutil 5.8.0 ptyprocess 0.7.0 py 1.10.0 pyam-iamc 1.3.1 pycodestyle 2.7.0 pycosat 0.6.3 pycparser 2.20 pycurl 7.44.1 pydocstyle 6.1.1 pyerfa 2.0.0 pyflakes 2.3.1 Pygments 2.10.0 PyJWT 2.3.0 pylint 2.9.6 pyls-spyder 0.4.0 PyNaCl 1.4.0 pyodbc 4.0.0-unsupported pyOpenSSL 21.0.0 pyparsing 3.0.4 pyreadline 2.1 pyrsistent 0.18.0 PySocks 1.7.1 pytest 6.2.4 python-dateutil 2.8.2 python-lsp-black 1.0.0 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.2.4 python-slugify 5.0.2 pytz 2021.3 PyWavelets 1.1.1 pywin32 228 pywin32-ctypes 0.2.0 pywinpty 0.5.7 PyYAML 6.0 pyzmq 22.2.1 QDarkStyle 3.0.2 qstylizer 0.1.10 QtAwesome 1.0.2 qtconsole 5.1.1 QtPy 1.10.0 regex 2021.8.3 requests 2.26.0 rfc3986 2.0.0 rope 0.19.0 Rtree 0.9.7 ruamel-yaml-conda 0.15.100 s3transfer 0.5.2 scikit-image 0.18.3 scikit-learn 0.24.2 scikit-learn-intelex 2021.20210714.120553 scipy 1.7.1 seaborn 0.11.2 Send2Trash 1.8.0 setuptools 58.0.4 setuptools-scm 6.4.2 simplegeneric 0.8.1 singledispatch 3.7.0 sip 4.19.13 six 1.16.0 sniffio 1.2.0 snowballstemmer 2.1.0 sortedcollections 2.1.0 sortedcontainers 2.4.0 soupsieve 2.2.1 sparse 0.13.0 Sphinx 4.2.0 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 sphinxcontrib-websupport 1.2.4 spyder 5.1.5 spyder-kernels 2.1.3 SQLAlchemy 1.4.22 statsmodels 0.12.2 sympy 1.9 tables 3.6.1 tableschema 1.19.3 tabulator 1.53.5 TBB 0.2 tblib 1.7.0 terminado 0.9.4 testpath 0.5.0 text-unidecode 1.3 textdistance 4.2.1 threadpoolctl 2.2.0 three-merge 0.1.1 tifffile 2021.7.2 tinycss 0.4 toml 0.10.2 tomli 2.0.1 toolz 0.11.1 tornado 6.1 tqdm 4.62.3 traitlets 5.1.0 typed-ast 1.4.3 typing-extensions 3.10.0.2 ujson 4.0.2 unicodecsv 0.14.1 Unidecode 1.2.0 urllib3 1.26.7 watchdog 2.1.3 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 2.0.2 wheel 0.37.0 whichcraft 0.6.1 widgetsnbextension 3.5.1 win-inet-pton 1.1.0 win-unicode-console 0.5 wincertstore 0.2 wrapt 1.12.1 xarray 2022.3.0 xlrd 2.0.1 XlsxWriter 3.0.1 xlwings 0.24.9 xlwt 1.3.0 xmltodict 0.12.0 yapf 0.31.0 zict 2.0.0 zipp 3.6.0 zope.event 4.5.0 zope.interface 5.4.0

conda list

packages in environment at C:\Users\energy\anaconda3:

#

Name Version Build Channel

_ipyw_jlab_nb_ext_conf 0.1.0 py39haa95532_0 alabaster 0.7.12 pyhd3eb1b0_0 anaconda 2021.11 py39_0 anaconda-client 1.9.0 py39haa95532_0 anaconda-navigator 2.1.1 py39_0 anaconda-project 0.10.1 pyhd3eb1b0_0 anyio 2.2.0 py39haa95532_2 appdirs 1.4.4 pyhd3eb1b0_0 argh 0.26.2 py39haa95532_0 argon2-cffi 20.1.0 py39h2bbff1b_1 arrow 0.13.1 py39haa95532_0 asn1crypto 1.4.0 py_0 astroid 2.6.6 py39haa95532_0 astropy 4.3.1 py39hc7d831d_0 async_generator 1.10 pyhd3eb1b0_0 atomicwrites 1.4.0 py_0 attrs 21.2.0 pyhd3eb1b0_0 autopep8 1.5.7 pyhd3eb1b0_0 babel 2.9.1 pyhd3eb1b0_0 backcall 0.2.0 pyhd3eb1b0_0 backports 1.0 pyhd3eb1b0_2 backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge backports.shutil_get_terminal_size 1.0.0 pyhd3eb1b0_3 backports.tempfile 1.0 py_0 conda-forge backports.weakref 1.0.post1 pyhd8ed1ab_1003 conda-forge bcrypt 3.2.0 py39h196d8e1_0 beautifulsoup4 4.10.0 pyh06a4308_0 binaryornot 0.4.4 pyhd3eb1b0_1 bitarray 2.3.0 py39h2bbff1b_1 bkcharts 0.2 py39haa95532_0 black 19.10b0 py_0 blas 1.0 mkl bleach 4.0.0 pyhd3eb1b0_0 blosc 1.21.0 h19a0ad4_0 bokeh 2.4.1 py39haa95532_0 boto 2.49.0 py39haa95532_0 boto3 1.21.34 pyhd8ed1ab_0 conda-forge botocore 1.24.34 pyhd8ed1ab_0 conda-forge bottleneck 1.3.2 py39h7cc1a96_1 brotli 1.0.9 ha925a31_2 conda-forge brotlipy 0.7.0 py39h2bbff1b_1003 bzip2 1.0.8 he774522_0 ca-certificates 2021.10.26 haa95532_2 cached-property 1.5.2 py_0 cchardet 2.1.7 py39h415ef7b_2 conda-forge certifi 2021.10.8 py39haa95532_0 cffi 1.14.6 py39h2bbff1b_0 cfitsio 3.470 he774522_6 chardet 4.0.0 py39haa95532_1003 charls 2.2.0 h6c2663c_0 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.0.3 pyhd3eb1b0_0 cloudpickle 2.0.0 pyhd3eb1b0_0 clyent 1.2.2 py39haa95532_1 colorama 0.4.4 pyhd3eb1b0_0 comtypes 1.1.10 py39haa95532_1002 conda 4.12.0 py39hcbf5309_0 conda-forge conda-build 3.21.6 py39haa95532_0 conda-content-trust 0.1.1 pyhd3eb1b0_0 conda-env 2.6.0 1 conda-pack 0.7.0 pyh6c4a22f_0 conda-forge conda-package-handling 1.8.1 py39hb3671d1_0 conda-forge conda-repo-cli 1.0.4 pyhd3eb1b0_0 conda-token 0.3.0 pyhd3eb1b0_0 conda-verify 3.4.2 py_1 console_shortcut 0.1.1 4 contextlib2 0.6.0.post1 pyhd3eb1b0_0 cookiecutter 1.7.2 pyhd3eb1b0_0 cryptography 3.4.8 py39h71e12ea_0 curl 7.78.0 h86230a5_0 cycler 0.10.0 py39haa95532_0 cython 0.29.24 py39h604cdb4_0 cytoolz 0.11.0 py39h2bbff1b_0 daal4py 2021.3.0 py39h757b272_0 dal 2021.3.0 haa95532_564 dask 2021.10.0 pyhd3eb1b0_0 dask-core 2021.10.0 pyhd3eb1b0_0 dataclasses 0.8 pyh6d0b6a4_7 datapackage 1.15.2 pyh44b312d_0 conda-forge debugpy 1.4.1 py39hd77b12b_0 decorator 5.1.0 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 descartes 1.1.0 py_4 conda-forge diff-match-patch 20200713 pyhd3eb1b0_0 distributed 2021.10.0 py39haa95532_0 docutils 0.17.1 py39haa95532_1 entrypoints 0.3 py39haa95532_0 et_xmlfile 1.1.0 py39haa95532_0 fastcache 1.1.0 py39h196d8e1_0 filelock 3.3.1 pyhd3eb1b0_1 flake8 3.9.2 pyhd3eb1b0_0 flask 1.1.2 pyhd3eb1b0_0 fonttools 4.25.0 pyhd3eb1b0_0 freetype 2.10.4 hd328e21_0 conda-forge fsspec 2021.10.1 pyhd3eb1b0_0 future 0.18.2 py39hcbf5309_5 conda-forge genno 1.10.0 pyhd8ed1ab_0 conda-forge get_terminal_size 1.0.0 h38e98db_0 gevent 21.8.0 py39h2bbff1b_1 giflib 5.2.1 h62dcd97_0 glob2 0.7 pyhd3eb1b0_0 graphviz 2.38.0 h6538335_1011 conda-forge greenlet 1.1.1 py39hd77b12b_0 h5py 3.2.1 py39h3de5c98_0 hdf5 1.10.6 h7ebc959_0 heapdict 1.0.1 pyhd3eb1b0_0 html5lib 1.1 pyhd3eb1b0_0 iam-units 2021.11.12 pyhd8ed1ab_0 conda-forge icc_rt 2019.0.0 h0cc432a_1 icu 58.2 ha925a31_3 idna 3.2 pyhd3eb1b0_0 ijson 3.1.3 pyhd3deb0d_0 conda-forge imagecodecs 2021.8.26 py39ha1f97ea_0 imageio 2.9.0 pyhd3eb1b0_0 imagesize 1.2.0 pyhd3eb1b0_0 importlib-metadata 4.8.1 py39haa95532_0 importlib_metadata 4.8.1 hd3eb1b0_0 inflection 0.5.1 py39haa95532_0 iniconfig 1.1.1 pyhd3eb1b0_0 intel-openmp 2021.4.0 haa95532_3556 intervaltree 3.1.0 pyhd3eb1b0_0 ipykernel 6.4.1 py39haa95532_1 ipython 7.29.0 py39hd4e2768_0 ipython_genutils 0.2.0 pyhd3eb1b0_1 ipywidgets 7.6.5 pyhd3eb1b0_1 isodate 0.6.1 pyhd8ed1ab_0 conda-forge isort 5.9.3 pyhd3eb1b0_0 itsdangerous 2.0.1 pyhd3eb1b0_0 ixmp 3.4.0 pyhd8ed1ab_0 conda-forge jdcal 1.4.1 pyhd3eb1b0_0 jedi 0.18.0 py39haa95532_1 jinja2 2.11.3 pyhd3eb1b0_0 jinja2-time 0.2.0 pyhd3eb1b0_2 jmespath 1.0.0 pyhd8ed1ab_0 conda-forge joblib 1.1.0 pyhd3eb1b0_0 jpeg 9d h2bbff1b_0 jpype1 1.3.0 py39h2e07f2f_2 conda-forge json5 0.9.6 pyhd3eb1b0_0 jsonlines 3.0.0 pyhd8ed1ab_0 conda-forge jsonpointer 2.0 py_0 conda-forge jsonschema 3.2.0 pyhd3eb1b0_2 jupyter 1.0.0 py39haa95532_7 jupyter_client 6.1.12 pyhd3eb1b0_0 jupyter_console 6.4.0 pyhd3eb1b0_0 jupyter_core 4.8.1 py39haa95532_0 jupyter_server 1.4.1 py39haa95532_0 jupyterlab 3.2.1 pyhd3eb1b0_1 jupyterlab_pygments 0.1.2 py_0 jupyterlab_server 2.8.2 pyhd3eb1b0_0 jupyterlab_widgets 1.0.0 pyhd3eb1b0_1 keyring 23.1.0 py39haa95532_0 kiwisolver 1.3.1 py39hd77b12b_0 krb5 1.19.2 h5b6d351_0 lazy-object-proxy 1.6.0 py39h2bbff1b_0 lcms2 2.12 h83e58a3_0 lerc 3.0 hd77b12b_0 libaec 1.0.4 h33f27b4_1 libarchive 3.4.2 h5e25573_0 libcurl 7.78.0 h86230a5_0 libdeflate 1.8 h2bbff1b_5 libiconv 1.15 h1df5818_7 liblief 0.10.1 hd77b12b_1 libpng 1.6.37 h2a8f88b_0 libspatialindex 1.9.3 h6c2663c_0 libssh2 1.9.0 h7a1dbc1_1 libtiff 4.2.0 hd0e1b90_0 libwebp 1.2.0 h2bbff1b_0 libxml2 2.9.12 h0ad7f3c_0 libxslt 1.1.34 he774522_0 libzopfli 1.0.3 ha925a31_0 conda-forge linear-tsv 1.1.0 py_1 conda-forge llvmlite 0.37.0 py39h23ce68f_1 locket 0.2.1 py39haa95532_1 lxml 4.6.3 py39h9b66d53_0 lz4-c 1.9.3 h2bbff1b_1 lzo 2.10 he774522_2 m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge markupsafe 1.1.1 py39h2bbff1b_0 matplotlib 3.4.3 py39haa95532_0 matplotlib-base 3.4.3 py39h49ac443_0 matplotlib-inline 0.1.2 pyhd3eb1b0_2 mccabe 0.6.1 py39haa95532_1 menuinst 1.4.18 py39h59b6b97_0 message-ix 3.4.0 pyhd8ed1ab_0 conda-forge mistune 0.8.4 py39h2bbff1b_1000 mizani 0.7.3 pyhd8ed1ab_0 conda-forge mkl 2021.4.0 haa95532_640 mkl-service 2.4.0 py39h2bbff1b_0 mkl_fft 1.3.1 py39h277e83a_0 mkl_random 1.2.2 py39hf11a4ad_0 mock 4.0.3 pyhd3eb1b0_0 more-itertools 8.10.0 pyhd3eb1b0_0 mpmath 1.2.1 py39haa95532_0 msgpack-python 1.0.2 py39h59b6b97_1 msys2-conda-epoch 20160418 1 conda-forge multipledispatch 0.6.0 py39haa95532_0 munkres 1.1.4 py_0 mypy_extensions 0.4.3 py39haa95532_0 navigator-updater 0.2.1 py39haa95532_0 nbclassic 0.2.6 pyhd3eb1b0_0 nbclient 0.5.3 pyhd3eb1b0_0 nbconvert 6.1.0 py39haa95532_0 nbformat 5.1.3 pyhd3eb1b0_0 nest-asyncio 1.5.1 pyhd3eb1b0_0 networkx 2.6.3 pyhd3eb1b0_0 nltk 3.6.5 pyhd3eb1b0_0 nose 1.3.7 pyhd3eb1b0_1006 notebook 6.4.5 py39haa95532_0 numba 0.54.1 py39hf11a4ad_0 numexpr 2.7.3 py39hb80d3ca_1 numpy 1.20.3 py39ha4e8547_0 numpy-base 1.20.3 py39hc2deb75_0 numpydoc 1.1.0 pyhd3eb1b0_1 olefile 0.46 pyhd3eb1b0_0 openjdk 11.0.9.1 h57928b3_1 conda-forge openjpeg 2.4.0 h4fc8c34_0 openpyxl 3.0.9 pyhd3eb1b0_0 openssl 1.1.1l h2bbff1b_0 packaging 21.0 pyhd3eb1b0_0 palettable 3.3.0 py_0 conda-forge pandas 1.3.4 py39h6214cd6_0 pandocfilters 1.4.3 py39haa95532_1 paramiko 2.7.2 py_0 parso 0.8.2 pyhd3eb1b0_0 partd 1.2.0 pyhd3eb1b0_0 path 16.0.0 py39haa95532_0 path.py 12.5.0 hd3eb1b0_0 pathlib2 2.3.6 py39haa95532_2 pathspec 0.7.0 py_0 conda-forge patsy 0.5.2 py39haa95532_0 pep8 1.7.1 py39haa95532_0 pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 8.4.0 py39hd45dc43_0 pint 0.19 pyhd8ed1ab_0 conda-forge pip 21.2.4 py39haa95532_0 pkginfo 1.7.1 py39haa95532_0 plotnine 0.8.0 pyhd8ed1ab_0 conda-forge pluggy 0.13.1 py39haa95532_0 ply 3.11 py39haa95532_0 powershell_shortcut 0.0.1 3 poyo 0.5.0 pyhd3eb1b0_0 prometheus_client 0.11.0 pyhd3eb1b0_0 prompt-toolkit 3.0.20 pyhd3eb1b0_0 prompt_toolkit 3.0.20 hd3eb1b0_0 psutil 5.8.0 py39h2bbff1b_1 ptyprocess 0.7.0 pyhd3eb1b0_2 py 1.10.0 pyhd3eb1b0_0 py-lief 0.10.1 py39hd77b12b_1 pyam 1.3.1 pyhd8ed1ab_0 conda-forge pycodestyle 2.7.0 pyhd3eb1b0_0 pycosat 0.6.3 py39h2bbff1b_0 pycparser 2.20 py_2 pycurl 7.44.1 py39hcd4344a_1 pydocstyle 6.1.1 pyhd3eb1b0_0 pyerfa 2.0.0 py39h2bbff1b_0 pyflakes 2.3.1 pyhd3eb1b0_0 pygments 2.10.0 pyhd3eb1b0_0 pyjwt 2.3.0 pyhd8ed1ab_1 conda-forge pylint 2.9.6 py39haa95532_1 pyls-spyder 0.4.0 pyhd3eb1b0_0 pynacl 1.4.0 py39hbd8134f_1 pyodbc 4.0.31 py39hd77b12b_0 pyopenssl 21.0.0 pyhd3eb1b0_1 pyparsing 3.0.4 pyhd3eb1b0_0 pyqt 5.9.2 py39hd77b12b_6 pyreadline 2.1 py39haa95532_1 pyrsistent 0.18.0 py39h196d8e1_0 pysocks 1.7.1 py39haa95532_0 pytables 3.6.1 py39h56d22b6_1 pytest 6.2.4 py39haa95532_2 python 3.9.7 h6244533_1 python-dateutil 2.8.2 pyhd3eb1b0_0 python-libarchive-c 2.9 pyhd3eb1b0_1 python-lsp-black 1.0.0 pyhd3eb1b0_0 python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0 python-lsp-server 1.2.4 pyhd3eb1b0_0 python-slugify 5.0.2 pyhd3eb1b0_0 python_abi 3.9 2_cp39 conda-forge pytz 2021.3 pyhd3eb1b0_0 pywavelets 1.1.1 py39h080aedc_4 pywin32 228 py39he774522_0 pywin32-ctypes 0.2.0 py39haa95532_1000 pywinpty 0.5.7 py39haa95532_0 pyyaml 6.0 py39h2bbff1b_1 pyzmq 22.2.1 py39hd77b12b_1 qdarkstyle 3.0.2 pyhd3eb1b0_0 qstylizer 0.1.10 pyhd3eb1b0_0 qt 5.9.7 vc14h73c81de_0 qtawesome 1.0.2 pyhd3eb1b0_0 qtconsole 5.1.1 pyhd3eb1b0_0 qtpy 1.10.0 pyhd3eb1b0_0 regex 2021.8.3 py39h2bbff1b_0 requests 2.26.0 pyhd3eb1b0_0 rfc3986 2.0.0 pyhd8ed1ab_0 conda-forge rope 0.19.0 pyhd3eb1b0_0 rtree 0.9.7 py39h2eaa2aa_1 ruamel_yaml 0.15.100 py39h2bbff1b_0 s3transfer 0.5.2 pyhd8ed1ab_0 conda-forge scikit-image 0.18.3 py39hf11a4ad_0 scikit-learn 0.24.2 py39hf11a4ad_1 scikit-learn-intelex 2021.3.0 py39haa95532_0 scipy 1.7.1 py39hbe87c03_2 seaborn 0.11.2 pyhd3eb1b0_0 send2trash 1.8.0 pyhd3eb1b0_1 setuptools 58.0.4 py39haa95532_0 setuptools-scm 6.4.2 pyhd8ed1ab_0 conda-forge setuptools_scm 6.4.2 hd8ed1ab_0 conda-forge simplegeneric 0.8.1 py39haa95532_2 singledispatch 3.7.0 pyhd3eb1b0_1001 sip 4.19.13 py39hd77b12b_0 six 1.16.0 pyhd3eb1b0_0 snappy 1.1.8 h33f27b4_0 sniffio 1.2.0 py39haa95532_1 snowballstemmer 2.1.0 pyhd3eb1b0_0 sortedcollections 2.1.0 pyhd3eb1b0_0 sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.2.1 pyhd3eb1b0_0 sparse 0.13.0 pyhd8ed1ab_0 conda-forge sphinx 4.2.0 pyhd3eb1b0_1 sphinxcontrib 1.0 py39haa95532_1 sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0 sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0 sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0 sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0 sphinxcontrib-websupport 1.2.4 py_0 spyder 5.1.5 py39haa95532_1 spyder-kernels 2.1.3 py39haa95532_0 sqlalchemy 1.4.22 py39h2bbff1b_0 sqlite 3.36.0 h2bbff1b_0 statsmodels 0.12.2 py39h2bbff1b_0 sympy 1.9 py39haa95532_0 tableschema 1.19.3 pyh9f0ad1d_0 conda-forge tabulator 1.53.5 pyhd8ed1ab_0 conda-forge tbb 2021.4.0 h59b6b97_0 tbb4py 2021.4.0 py39h59b6b97_0 tblib 1.7.0 pyhd3eb1b0_0 terminado 0.9.4 py39haa95532_0 testpath 0.5.0 pyhd3eb1b0_0 text-unidecode 1.3 pyhd3eb1b0_0 textdistance 4.2.1 pyhd3eb1b0_0 threadpoolctl 2.2.0 pyh0d69192_0 three-merge 0.1.1 pyhd3eb1b0_0 tifffile 2021.7.2 pyhd3eb1b0_2 tinycss 0.4 pyhd3eb1b0_1002 tk 8.6.11 h2bbff1b_0 toml 0.10.2 pyhd3eb1b0_0 tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.11.1 pyhd3eb1b0_0 tornado 6.1 py39h2bbff1b_0 tqdm 4.62.3 pyhd3eb1b0_1 traitlets 5.1.0 pyhd3eb1b0_0 typed-ast 1.4.3 py39h2bbff1b_1 typing_extensions 3.10.0.2 pyh06a4308_0 tzdata 2021e hda174b7_0 ujson 4.0.2 py39hd77b12b_0 unicodecsv 0.14.1 py39haa95532_0 unidecode 1.2.0 pyhd3eb1b0_0 urllib3 1.26.7 pyhd3eb1b0_0 vc 14.2 h21ff451_1 vs2013_runtime 12.0.21005 1 vs2015_runtime 14.27.29016 h5e58377_2 watchdog 2.1.3 py39haa95532_0 wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py39haa95532_1 werkzeug 2.0.2 pyhd3eb1b0_0 wheel 0.37.0 pyhd3eb1b0_1 whichcraft 0.6.1 pyhd3eb1b0_0 widgetsnbextension 3.5.1 py39haa95532_0 win_inet_pton 1.1.0 py39haa95532_0 win_unicode_console 0.5 py39haa95532_0 wincertstore 0.2 py39haa95532_2 winpty 0.4.3 4 conda-forge wrapt 1.12.1 py39h196d8e1_1 xarray 2022.3.0 pyhd8ed1ab_0 conda-forge xlrd 2.0.1 pyhd3eb1b0_0 xlsxwriter 3.0.1 pyhd3eb1b0_0 xlwings 0.24.9 py39haa95532_0 xlwt 1.3.0 py39haa95532_0 xmltodict 0.12.0 py_0 conda-forge xz 5.2.5 h62dcd97_0 yaml 0.2.5 he774522_0 conda-forge yapf 0.31.0 pyhd3eb1b0_0 zfp 0.5.5 hd77b12b_6 zict 2.0.0 pyhd3eb1b0_0 zipp 3.6.0 pyhd3eb1b0_0 zlib 1.2.11 h62dcd97_4 zope 1.0 py39haa95532_1 zope.event 4.5.0 py39haa95532_0 zope.interface 5.4.0 py39h2bbff1b_0 zstd 1.4.9 h19a0ad4_0

khaeru commented 2 years ago

With this information, we can confirm this is a known problem, e.g. #557:

Pint 0.19

You should install Pint version 0.19.2, or 0.18.

Please confirm if this fixes the issue.

PelinaP commented 2 years ago

Screenshot 2022-05-10 114754

it did not solve the error. it now brings a new error.

This my first part of code:

load required packages

import itertools import pandas as pd

import matplotlib.pyplot as plt %matplotlib inline plt.style.use('ggplot')

import ixmp as ix import message_ix import pint

from message_ix.utils import make_df from tools import Plots

launch the IX modeling platform using the local default database

mp = ixmp.Platform()

NameError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_10724/3925686035.py in 1 # launch the IX modeling platform using the local default database ----> 2 mp = ixmp.Platform()

NameError: name 'ixmp' is not defined

Output of message-ix show-versions [W 12:17:29.473 NotebookApp] 404 GET /api/kernels/976eeaf3-3e10-41ec-80ed-d7faaad78f32/channels?session_id=176c44a513e44883ba6d232f37b0f7bc (::1): Kernel does not exist: 976eeaf3-3e10-41ec-80ed-d7faaad78f32 [W 12:17:29.552 NotebookApp] 404 GET /api/kernels/976eeaf3-3e10-41ec-80ed-d7faaad78f32/channels?session_id=176c44a513e44883ba6d232f37b0f7bc (::1) 78.920000ms referer=None [I 12:17:43.852 NotebookApp] Kernel started: a6c1d6b4-f6bd-4687-9096-36131362840b, name: python3

PelinaP commented 2 years ago

I now have this issue after downloading pint

Screenshot 2022-05-10 125032 Screenshot 2022-05-10 125325

key error;RuntimeError: unhandled Java exception: Unable to obtain connection from database (jdbc:hsqldb:file:C:/Users/energy/.local/share/ixmp/localdb/default) for user 'ixmp': Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@fc33f71a[file =C:\Users\energy.local\share\ixmp\localdb\default.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2022-05-10 03:44:36 heartbeat - read: -7788 ms.

SQL State : S1000 Error Code : -451 Message : Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@fc33f71a[file =C:\Users\energy.local\share\ixmp\localdb\default.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2022-05-10 03:44:36 heartbeat - read: -7788 ms.

Output of message-ix show-versions 2022-05-10 12:42:27,629 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'I' not found in gdx! 2022-05-10 12:42:27,629 ERROR at.ac.iiasa.ixmp.objects.Scenario:1691 - variable 'C' not found in gdx! [I 12:44:04.506 NotebookApp] Saving file at /Desktop/Zambia Supply Model 3/Zambia/Zambian Energy System [Monthly].ipynb [I 12:44:07.393 NotebookApp] Kernel started: cbbfe263-a7fd-4c3f-9bd4-c955494d79ff, name: python3 [I 12:44:39.891 NotebookApp] Saving file at /Desktop/Zambia Supply Model 3/Zambia/renewable scenario.ipynb