Closed PieterjanVerhelst closed 2 years ago
My first thought was that the last /
in the path could be the issue, but I just tried it locally and the code seems to work both with and without the last bar.
It is interesting that actel itself is finding the file (otherwise there would be a different error earlier on). It may be an rgdal bug...
Can you try running the code below to see if the error persists?
rgdal::readOGR(dsn = "./data/external/shapefiles/", layer = 'be_rivers')
Can you also confirm which rgdal version you are using?
packageVersion('rgdal')
That code is returning the same error indeed.
I use version 1.5.28
It is the same version as I am using. Try removing the last /
to see if that changes anything. Next, try to remove the ./
at the beginning. If the error persists, confirm that the shapefile is not corrupted. Consider trying a different shapefile to see if the error persists.
Aah, when removing the final /
it works. Thanks for the quick service 👍!
When I feed
loadShape()
with the.shp
files stored in my default path, the function runs perfectly:However, when I run the function on a
.shp
files stored in a specific folder, I get an error related to thereadOGR()
function from thergdal
package: