Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in the workflow/scripts/create_modelrun.py #9

Open
Timon-R opened this issue Jan 9, 2024 · 0 comments
Open

Errors in the workflow/scripts/create_modelrun.py #9

Timon-R opened this issue Jan 9, 2024 · 0 comments

Comments

@Timon-R
Copy link

Timon-R commented Jan 9, 2024

When running the workflow, I encountered a VALUE ERROR in line 190 in the workflow/scripts/create_modelrun.py
It suggested that the indexed column wouldn't exist even though it did.
I solved by replacing

model_params[name].loc[tuple(index + [first_year]):tuple(index + [end_year])] = interpolated_values

with

interp_values = iter(interpolated_values.flatten().astype(float))
for year in range(first_year, end_year + 1):
     model_params[name].loc[tuple(index) + (year,)] = next(interp_values) 

I also had to modify the function get_types_from_tuple(). My datatype was int64 which wasn't included in the function and raised an error! Currently, only str, int and float are included.

@Timon-R Timon-R changed the title Error in the workflow/scripts/create_modelrun.py Errors in the workflow/scripts/create_modelrun.py Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant