# Value Error: Flow accumulation in SDR

**URL:** <https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868>\
**Category:** Software Support\
**Tags:** sdr\
**Created:** [March 11, 2020, 10:16am UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868 "2020-03-11T10:16:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlureta](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@carlureta](https://community.naturalcapitalalliance.org/u/carlureta)\
**Post date:** [March 11, 2020, 10:16am UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/1 "2020-03-11T10:16:29Z")

</div>

Hi All,

I was looking for a similar topic as this one but I cannot find.  
Anyone encountered this same error message? And how did you address this?

ValueError: (‘got a %s when trying to read %s at %s’, None, [‘C:/Users/jureta/Desktop/SDR\_2018\_SCSubBB\intermediate\_outputs\flow\_accumulation\_SCSubBB\_K096\_2018.tif’], {‘xoff’: 16384, ‘yoff’: 13312, ‘win\_xsize’: 256, ‘win\_ysize’: 256})

Here’s the log file for reference.  
[InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2020-03-10–23\_43\_53.txt](https://community.naturalcapitalalliance.org/uploads/short-url/rvQGGieM55sYJuViJDAK5hwSDK6.txt) (54.4 KB)

Thanks!

---

<div class="post-metadata">

**Author:** ![dcdenu4](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dcdenu4/32/544_2.png) [@dcdenu4](https://community.naturalcapitalalliance.org/u/dcdenu4)\
**Post date:** [March 11, 2020, 1:50pm UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/2 "2020-03-11T13:50:56Z")

</div>

Hi @carlureta,

Looks like it could be similar to this NDR issue: [NDR: Value Error](https://community.naturalcapitalalliance.org/t/ndr-3-8-0-valueerror-encountered/857/2)

We’re still working on debugging that issue at the moment.

Doug

---

<div class="post-metadata">

**Author:** ![carlureta](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@carlureta](https://community.naturalcapitalalliance.org/u/carlureta)\
**Post date:** [March 11, 2020, 2:04pm UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/3 "2020-03-11T14:04:43Z")

</div>

Hi @dcdenu4,

thanks for this.  
yes, it seems similar to that one. thanks for routing me that.  
maybe something to do with large dataset?  
but I did an even larger dataset before (state wide) and it worked fine.  
will wait for further updates on this.

many thanks for your help, as always.

Carl

---

<div class="post-metadata">

**Author:** ![dcdenu4](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dcdenu4/32/544_2.png) [@dcdenu4](https://community.naturalcapitalalliance.org/u/dcdenu4)\
**Post date:** [April 3, 2020, 8:49pm UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/4 "2020-04-03T20:49:00Z")

</div>

Hi @carlureta,

Just thought I’d send an update here. We are still actively looking into this issue but in the meantime we have seen some success when pre-filling the DEM for sinks or pits. We are doing this using the **Fill Sinks (Wang & Liu)** tool in the QGIS tooblbox.

Could you try filling the sinks or pits of your DEM and then using that DEM to run the SDR model?

Cheers,

Doug

---

<div class="post-metadata">

**Author:** ![carlureta](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@carlureta](https://community.naturalcapitalalliance.org/u/carlureta)\
**Post date:** [April 4, 2020, 12:23pm UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/5 "2020-04-04T12:23:25Z")

</div>

@dcdenu4, thanks for the update. will try that. The DEM that I use, though, is a filled DEM from ArcGIS. Will try it again with your recommendation and let you know.  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![felipebenra](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/felipebenra/32/88_2.png) [@felipebenra](https://community.naturalcapitalalliance.org/u/felipebenra)\
**Post date:** [November 7, 2020, 8:47pm UTC](https://community.naturalcapitalalliance.org/t/value-error-flow-accumulation-in-sdr/868/6 "2020-11-07T20:47:14Z")

</div>

Hello,

Any updates on this issue? Did the filled DEM work?
