SDR error "invalid literal for int() with base 10"

Hi folks,
I've been trying to run the SDR model on baseline data and keep getting the following message:
"invalid literal for int() with base 10"

We've checked projections, pixel size, no data, negative values (DEM), mask. We also tried using different paths c://misdocuments/SDR; c://SDR; using DEMs from different sources such as worldclim and checked consistency between the biophysical table and rasters/fields. We've tried re-installing SDR, running it on only one sub-basin, altering the threshold accum. values. I'm at a loss for other potential problems.

I've tried to troubleshoot with Perrine and nothing works! Any help would be much Appreciated!!!

I'm attaching a link to our files and the log in case that is helpful in diagnosis. In it you will find:

1) input folder with the mask and datafiles which are all well aligned (matching extent, pixel size, coordinates)
2) .json file for SDR
3) log.. with the error
4) mpk.. this is an easy way to see the files that iused in arcgis
5) biophysical table



  • RichRich Administrator, NatCap Staff
    Hi Sylvi, thanks for the perfect bug report.  Looks like the issue was caused by "blank" lines in the CSV.  You can see them when you open up the CSV in a text editor:

    11,11,Permanent wetlands,0.00,1.00,2000.00,1.20,1.00,0.00,0.05,0.00,0.05,
    13,13,Urban and built-up,0.10,1.00,1000.00,0.45,0.00,11.86,0.43,2.55,0.02,
    14,14,Cropland/Natural vegetation mosaic,0.10,1.00,2095.00,1.07,1.00,5.15,0.75,0.69,0.67,
    15,15,Snow and ice,0.00,1.00,100.00,0.25,0.00,0.00,0.05,0.00,0.05,
    16,16,Barren or sparsely vegetated,1.00,1.00,100.00,0.18,1.00,4.00,0.05,0.05,0.05,

    And so on.  I removed those commas and was able to run through the model with your data without a problem. I also patched InVEST so that future versions will be tolerant of this CSV state.  And to save you time, I posted your modified CSV table that works on my end here:
  • Brilliant -Thanks Rich!
Sign In or Register to comment.