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

Urban flood biophysical table with empty values raises cryptic error #1346

Closed
dcdenu4 opened this issue Jul 7, 2023 · 0 comments · Fixed by #1372
Closed

Urban flood biophysical table with empty values raises cryptic error #1346

dcdenu4 opened this issue Jul 7, 2023 · 0 comments · Fixed by #1372
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dcdenu4
Copy link
Member

dcdenu4 commented Jul 7, 2023

A few users have reported the following error when running the urban flood risk mitigation model:

07/07/2023 09:21:29  natcap.invest.utils WARNING  Empty or NaN values were found in the table: C:\Users\ddenu\Downloads\UrbanFloodMitigation\Biophysical_water_SF_empty_values.csv.
07/07/2023 09:21:29  natcap.invest.utils ERROR    Exception while executing natcap.invest.urban_flood_risk_mitigation
Traceback (most recent call last):
  File "scipy\sparse\_base.py", line 376, in asformat
  File "scipy\sparse\_coo.py", line 403, in tocsr
  File "scipy\sparse\_sputils.py", line 53, in upcast
TypeError: no supported conversion for types: (dtype('<U32'),)

This can happen when CN_[x] columns in the biophysical table have empty values. At the very least better error handling and messaging should be implemented. But with ongoing work to the Model Spec and CSV reading, maybe this is something that can be checked in a validation step.

Reported a few times on the forums:

@dcdenu4 dcdenu4 added the bug Something isn't working label Jul 7, 2023
@dcdenu4 dcdenu4 added this to the 3.13.1 milestone Jul 7, 2023
@dcdenu4 dcdenu4 self-assigned this Aug 1, 2023
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Aug 14, 2023
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Aug 14, 2023
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Aug 16, 2023
dcdenu4 added a commit to dcdenu4/invest that referenced this issue Aug 21, 2023
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