wcmbishop / rayshader-demo

I can rayshade, and so can you!
https://wcmbishop.github.io/rayshader-demo/
57 stars 8 forks source link

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

Open saso008 opened 4 years ago

saso008 commented 4 years ago

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)

sowusu08 commented 4 years ago

I'm getting this error too @wcmbishop

caseyyoungflesh commented 3 years ago

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.