polca / premise

Coupling Integrated Assessment Models output with Life Cycle Assessment.
BSD 3-Clause "New" or "Revised" License
100 stars 45 forks source link

Problem with the pip install of premise version 1.8.1 #132

Closed MaximeAgez closed 8 months ago

MaximeAgez commented 8 months ago

Hi. Tried to install premise v1.8.1 through pip. Installation works. But whenever I try to call from premise import *' I get the following error.

Error.pdf

cmutel commented 8 months ago

THe error is

11 import warnings
---> 13 from jsonschema._format import FormatChecker
14 from jsonschema._types import TypeChecker
15 from jsonschema.exceptions import SchemaError, ValidationError
File ~\AppData\Local\anaconda3new\envs\premisever\lib\site-packages\json schema\_format.py:503
497 with suppress(ImportError): 
498 import isoduration
500 @_checks_drafts(
501
502
--> 503
504 )
draft201909="duration",
draft202012="duration",
raises=isoduration.DurationParsingException,
505 506 507
def is_duration(instance: object) -> bool: if not isinstance(instance, str):
return True
AttributeError: module 'isoduration' has no attribute 'DurationParsingException'

However, the isoduration library has had 'DurationParsingException' in its __init__.py for at least three years.

In the same issue in another repo, they suggested reinstalling isoduration. Maybe that helps?

MaximeAgez commented 8 months ago

Updating isoduration solved the issue indeed :)