rayshader-demo icon indicating copy to clipboard operation
rayshader-demo copied to clipboard

Error in file(con, "wb") : cannot open the connection

Open saso008 opened this issue 5 years ago • 2 comments

i want to download elevation data and run the under code get an error get_usgs_elevation_data(bbox, size = image_size$size, file = elev_file, sr_bbox = 4326, sr_image = 4326) how can resolve it? Error in file(con, "wb") : cannot open the connection In addition: Warning message: In file(con, "wb") :

Error in file(con, "wb") : cannot open the connection 3. file(con, "wb") 2. writeBin(img_bin, file) 1. get_usgs_elevation_data(bbox, size = image_size$size, file = elev_file, sr_bbox = 4326, sr_image = 4326)

saso008 avatar Nov 30 '19 18:11 saso008

I'm getting this error too @wcmbishop

sowusu08 avatar Aug 27 '20 20:08 sowusu08

For those that stumble upon this and are having this issue, make sure the path that you designate in file.path exists.

elev_file <- file.path("REAL_PATH_ON_YOUR_MACHINE_HERE", "sf-elevation.tif")

For example, ~/Dekstop works for me.

caseyyoungflesh avatar Apr 30 '21 19:04 caseyyoungflesh