raster icon indicating copy to clipboard operation
raster copied to clipboard

Error in x$.self$finalize() : attempt to apply non-function

Open caemillan opened this issue 3 years ago • 3 comments

I am tried to read a shapefile: raster::shapefile("myshape.shp")

And show an error Error in x$.self$finalize() : attempt to apply non-function.

I tried to reinstall the package; uninstall R and RStudio and all packages, but doesn´t resolve the problem. Captura

Any suggestion?

caemillan avatar Aug 23 '22 22:08 caemillan

These are annoying messages that I understand to be emitted by the R garbage collection process. They are not errors in the sense that your code runs and your results are not affected. So you can ignore them.

rhijmans avatar Aug 24 '22 06:08 rhijmans

It looks like this problem has now been solved by making a change in Rcpp, but it will take a couple of months until that is released

rhijmans avatar Sep 27 '22 18:09 rhijmans

But if you can install "terra" from source, the problem will go away if you use the development version of Rcpp

install.packages("Rcpp", repos="https://rcppcore.github.io/drat")
install.packages("terra")

rhijmans avatar Sep 27 '22 18:09 rhijmans

These messages no longer appear if you use the current CRAN version of Rcpp.

rhijmans avatar Feb 21 '23 21:02 rhijmans