r-barnes / richdem

High-performance Terrain and Hydrology Analysis
GNU General Public License v3.0
264 stars 67 forks source link

[WinError 10054] An existing connection was forcibly closed by the remote host #76

Open frederikvand opened 7 months ago

frederikvand commented 7 months ago

In my production script I always get [WinError 10054] An existing connection was forcibly closed by the remote host. This issue does not reproduce in a different clean script. Same environment, same terminal, same package. Why is richdem calling a remote host? Its a small raster and I have 64 gb of ram. I didn't have this problem a couple days ago and no idea what what changed. The error occurs when TerrainAttribute is called.

Tot_height_rd = rd.rdarray(Tot_height, no_data=np.nan)

get slope = rd.TerrainAttribute( height_array, attrib="slope_degrees" ) # slope_riserun

If I load exactly the same packages in the clean script and use TerrainAttribute it still works. Can't find the cause at all.

frederikvand commented 7 months ago

It only seems to occur when transforming the array with Tot_height_rd = rd.rdarray(Tot_height, no_data=np.nan) When I write the matrix to disk and then load it with richdem_raster = rd.LoadGDAL(dem_path), the error seems solved.