# The running of SDR InVEST 3.8.2 get stuck or closed and result is not complete

I’ve had the following problem twice.
The sed_retention, watershed_results_SDR files are missing in the output results of the model, and the running will be stuck or closed in the end.

At the first time, the calibrated parameters k=1.5 and IC0=0.628 were used. The simulation was successful in 2015, but failed in 2018，as showed in tex log file 1.1 and 1.2
On this basis, two adjustments were attempted for the simulation in 2018.
(1) The watershed boundary was replaced by the boundary without lake area, and the simulation is successful. Corresponding tex log file 1.3
(2) Lake area was still inclued in the watershed boundary, but k and IC0 were changed to default 2 and 0.5, and the simulation was successful. Corresponding tex log file 1.4

At the second time, the calibrated parameters k=1.4 and IC0=0.5 (default) were used, the simulation failed in 2010. Corresponding tex log file 2.1.
(1) the watershed boundary was changed to one without lakes, the simulation still fails. Corresponding tex log file 2.2
(2) Change k to the default 2.0, and the simulation was successful. Corresponding tex log file 2.3

As we can see, when k and IC0 are set as the default, the simulation succeeds, but some years it succeeds when it’s not the default;
So I was puzzled by these results. What’s the real reason for the failed running?

Hi @Gloria,

So in looking at your logfiles, I’m seeing lots of errors that look like this:

``````2020-10-12 13:41:08,590 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,592 utils._log_gdal_errors(68) ERROR [errno 1] LZWDecode:Corrupted LZW table at scanline 5632
2020-10-12 13:41:08,592 utils._log_gdal_errors(68) ERROR [errno 1] TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] LZWDecode:Corrupted LZW table at scanline 5632
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] TIFFReadEncodedTile() failed.
2020-10-12 13:41:08,593 utils._log_gdal_errors(68) ERROR [errno 1] F:/INVEST/SDR\sed_deposition_2018_NSH.tif, band 1: IReadBlock failed at X offset 22, Y offset 13: TIFFReadEncodedTile() failed.
``````

This is an issue within GDAL, which is one of the libraries that InVEST depends on for reading and writing rasters. In this case, the issue only happens on some rasters when some very specific conditions are met … which is why the issue is only happening on some of the years of your simulation.

So all of that is to say that this issue will be fixed properly in InVEST 3.9.0, which should be coming out in the next couple weeks, and until then, here’s a development preview of InVEST 3.9 that should include the updated GDAL version: