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

Wind Energy not casting number arguments #1498

Closed
dcdenu4 opened this issue Jan 5, 2024 · 0 comments · Fixed by #1499
Closed

Wind Energy not casting number arguments #1498

dcdenu4 opened this issue Jan 5, 2024 · 0 comments · Fixed by #1499
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dcdenu4
Copy link
Member

dcdenu4 commented Jan 5, 2024

Rob G. reported in Slack that he and a colleague were experiencing issues with the wind energy model when trying to edit the foundation_cost in the Workbench UI. They were getting:

2024-01-03 21:09:01,050 (natcap.invest.wind_energy) wind_energy._calculate_npv_levelized_rasters(1357) INFO Creating output NPV and levelized rasters.
2024-01-03 21:09:01,063 (taskgraph.Task) Task.add_task(706) ERROR Something went wrong when adding task calculate_npv_levelized_rasters (18), terminating taskgraph.
Traceback (most recent call last):
  File "taskgraph\Task.py", line 674, in add_task
  File "taskgraph\Task.py", line 1093, in _call
  File "natcap\invest\wind_energy.py", line 1415, in _calculate_npv_levelized_rasters
TypeError: can only concatenate str (not "float") to str

It turns out that the wind energy model passes all of args into _calculate_npv_levelized_rasters and does not do any casting on the number fields it uses from args.

@dcdenu4 dcdenu4 self-assigned this Jan 5, 2024
@dcdenu4 dcdenu4 added the bug Something isn't working label Jan 5, 2024
@dcdenu4 dcdenu4 added this to the 3.14.2 milestone Jan 5, 2024
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Jan 5, 2024
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Jan 5, 2024
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Mar 29, 2024
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Mar 29, 2024
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant