Skip to content

Commit

Permalink
fixed empty list bug
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorb1 committed Mar 29, 2022
1 parent f34467f commit beda04c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions workflow/scripts/osemosys_global/OPG_powerplant_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ def f(node):

# Do not allow investment for all xxxABCxxxxxxx technologies
no_investment_techs = config.get('no_invest_technologies')
if not no_investment_techs:
no_investment_techs = [] # Change from None type to empty list
max_cap_invest_techs = list(set(df_iar_final.loc[
df_iar_final['TECHNOLOGY'].str[3:6].isin(no_investment_techs)][
'TECHNOLOGY'].tolist()))
Expand Down

0 comments on commit beda04c

Please sign in to comment.