Closed khaeru closed 2 years ago
EDIT: this was caused by also having a 0.2.0
version of ixmp installed (which apparently does not have check_keys), which was then being called, rather than the master
version. Removing the ixmp package folders and reinstalling by pip install --editable .
solves the issue.
After installing ixmp and subsequently _messageix and pyam (see https://github.com/IAMconsortium/pyam/issues/259) from source, I ran into the following issue with westeros_reporting.pynb
:
AttributeError Traceback (most recent call last)
<ipython-input-12-20b6f6717002> in <module>
1 # Create a reporter from the existing Scenario
----> 2 rep = Reporter.from_scenario(scen)
3
4 # Reporter uses the Python pint to handle units. '-', used in the Westeros
5 # tutorial, is not a defined SI unit. We tell the Reporter to replace it with
~\AppData\Local\Continuum\anaconda3\lib\site-packages\message_ix\reporting\__init__.py in from_scenario(cls, scenario, **kwargs)
144 key += ':pyam'
145 try:
--> 146 rep.as_pyam(qty, year_dim, key, collapse=collapse_cb)
147 except KeyError as e:
148 log.info(f'{e.args[0]} not in scenario → not adding {key}')
~\AppData\Local\Continuum\anaconda3\lib\site-packages\message_ix\reporting\__init__.py in as_pyam(self, quantities, year_time_dim, key, drop, collapse)
195 if isinstance(quantities, (str, Key)):
196 quantities = [quantities]
--> 197 quantities = self.check_keys(*quantities)
198
199 keys = []
AttributeError: 'Reporter' object has no attribute 'check_keys' ```
Near the end of the westeros_reporting.ipynb
tutorial, the plotnine
package is imported, however this does not automatically get installed with Anaconda, hence the user needs to first install it before being able to run the last plotting part.
So I would suggest to add a line about doing pip install plotnine
Postponed to v3.3 (or later).
Postponed 'til after 3.3. Some of the items have already been resolved, as noted in the description above.
Postponed, as no time to complete this week.
During the 2–4 October 2019 workshop, we identified some issues with the
westeros_reporting.ipynb
tutorial:master
branch of both ixmp and the message_ix; the tutorial should provide or refer to instructions on how to do this.~ as of 2021-05-24, no longer necessary.messageix-dl
does not download the tutorials from themaster
branch in some cases.~ fixed in #256.[reporting]
extra dependencies (i.e. pyam-iamc) must also be installed in order to run the tutorial.Please leave a comment with any additional issues.