Skip to content

Commit 7f1fc0a

Browse files
workaround pint's apparent inability to handle '%' as a unit in python3.8
1 parent ffcb990 commit 7f1fc0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/geophires_x/Economics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ def __init__(self, model: Model):
13831383
)
13841384

13851385
fir_default_unit = PercentUnit.PERCENT
1386-
fir_default_val = self.discountrate.quantity().to(fir_default_unit.value).magnitude
1386+
fir_default_val = self.discountrate.quantity().to('percent').magnitude # pint can't handle '%' in python 3.8
13871387
self.FixedInternalRate = self.ParameterDict[self.FixedInternalRate.Name] = floatParameter(
13881388
"Fixed Internal Rate",
13891389
DefaultValue=fir_default_val,

0 commit comments

Comments
 (0)