LFG
LFG

Reputation: 31

Impact calculation in Climada (Python)

I am having a hard time computing the impact calculation using Climada in Python.

The issue is that I cannot import any function from climada.engine to my environment. All the other functions from climada (hazard, petal, entity) are working, but just not the engine.

I am running this:

from climada.engine import Impact, ImpactCalc

and getting this error:

KeyError                                  Traceback (most recent call last)
File c:\Users\XXX\miniforge3\envs\climada_env\lib\site-packages\xyzservices\lib.py:44, in Bunch.__getattr__(self, key)
     43 try:
---> 44     return self.__getitem__(key)
     45 except KeyError as err:

KeyError: 'Stamen'

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

For info I am using VS Code in a Windows machine with Python 3.9.19

I already tried to import manually and also update the xyzservices without success.

Upvotes: 2

Views: 45

Answers (1)

timmey
timmey

Reputation: 125

There seems to be a problem with your python environment. Please try to reinstall CLIMADA in a fresh environment as described in the installation guide https://climada-python.readthedocs.io/en/stable/guide/install.html. This should resolve the issue.

Upvotes: 1

Related Questions