Comments (13)
Looks like problem with installation/upgrade of arcgisbinding
.
Lets troubleshoot it first. start Rgui.exe and evaluate following commands (first example in ?arc.write doc):
library(arcgisbinging);library(arcgisbinging)
## Example #1. write a shapefile
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp"), d)
If you have problem to execute it then close all sessions of R, including Rgui, ArcGIS, RStudio, VSCode etc. Delete existing arcgisbinding
package (check C:\Users\rata\Documents\R\R-3.6.0\library\arcgisbinding) Download arcgisbinding_1.0.1.232.zip. Start fresh instance of Rgui.exe and from menu>Packages>"Install packages from local file..." navigate to Download folder and pick arcgisbinding_1.0.1.232.zip file. Re-do Example #1.
from r-bridge.
library(arcgisbinging)
was that a typo? why call the library twice? Was omitting arc.check_product()
intentional?
I ran the following lines in Rgui.exe
(64-bit) and it didn't crash:
library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp"), d)
from r-bridge.
Short solution - change output location from "C:/Users/scratch.gdb/nc" to other where you have permission to write a new file. Like "C:/Users/rata/scratch.gdb/nc" or file.path(tempdir(), scratch.gdb/nc
I'll try to fix hard crash by the next release.
from r-bridge.
change output location from "C:/Users/scratch.gdb/nc" to other where you have permission to write a new file.
Tried this within RStudio IDE, still results in a hard crash
from r-bridge.
Thanks for trying that out, sorry to hear it didn't work. It possibly could be a DLL conflict between the R environment and ArcGIS, though we haven't been able to reproduce it yet on our end. Could you see if you can reproduce this crash in just an Rgui.exe session? Could you also try @dpavlushko's sample code, adding in a library(sf)
call and see if that crashes? sf
should be statically linked to its own copy of GDAL/GEOS/PROJ, but wanted to see if any of the above has an effect.
from r-bridge.
This is really confusing. I just ran the following lines in Rgui and RStudio, and neither crashed!
library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write("C:/Users/rata/Downloads/test.gdb/data",d)
from r-bridge.
Im having a maybe related problem, but it seems to have been fixed by installing arcgisbinding_1.0.1.232.zip as you suggested. Prior I was using the most recent version.
At first I thought the problem was specific to rstudio as I was getting an error related to libobjects_pro.dll when trying to load arcgisbinding from rstudio. I could could load from the R Console without error, both 64 and 32 bit, most of the time. I say most of the time as there were 1 instance where I got the same error in the Console. So I agree this is confusing!
However, I got an persistent error when using either arc.write or arc.open in the Console. I'm sorry I don't recollect what the error was. Finally, ArcGIS Pro was crashing within seconds when trying to run an R script. This is my first R script i ArcGIS so difficult to assess if it was something with my R code or ArcGIS, but given all of the above I'm guessing it's arcgisbinding that's the problem.
Hopefully this is helpful, please let me know if you need more info.
from r-bridge.
This issue is certainly confusing. Sometimes arc.write works as expected for me, and other times it crashes RStudio (abort session).
I am running version 1.0.1.237. Anyone have further guidance since the last post?
Thank you
from r-bridge.
I'm having a very similar issue running 1.0.1.241 with frequent RStudio crashes.
from r-bridge.
I am having a similar issue. Downloaded arcgisbinding a few days ago but started working with it today. Now getting fatal errors when I run Rstudio code with arcgisbinding in it. Sometimes even before loading the package. Uninstall/reinstall of R and Rstudio did not fix issue. Could it be related to the environment I set up in ArcGIS pro?
(I am a beginner)
from r-bridge.
EDIT: resolved my fatal error. Newest version of arcgisbinding allows ability to import from ArcPro and manipulate data other ways in R, just not arc.write to a .gdb
from r-bridge.
For anyone affected by this, can you see if you're able to reproduce in just the plain RGUI interface? And if you do get a crash in RStudio, there should be a crash dump located at %LOCALAPPDATA%\R\crashpad_database\reports
which is generated, which hopefully we can access. RStudio will get these crashes so we don't see them on our end, and we're not able to reproduce this locally on a few different machines.
from r-bridge.
So, I'm going to follow up my edited follow-up. I can get it to run arc.write without fatal error, but only in administrator mode, and after running the test code mentioned and provided by @ratnanil :
`library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
class(d)
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp")'
After running that, arc.write works for my personal code if in the same session. Without running that first in a session, I get fatal error when trying to run arc.write line
from r-bridge.
Related Issues (20)
- Error in .call_proxy ( ) Class not registered
- R Studio 4.1.2 crashes when trying to use arcgisbinding functions (e.g. arc.open()) HOT 8
- Not working with 4.2.0 HOT 3
- Survey123 Feature Layers in R HOT 4
- Failed to load rarcproxy_pro.dll - R script tools do not work HOT 3
- Implement `st_as_sf()` methods for arcgisbinding classes
- unable to access index for repository https://r.esri.com/bin/windows/contrib/4.2:
- arc.write - add records/row to existing feature layer in GDB HOT 3
- arc.portal_connect() crashes HOT 21
- Multiple attempts required to open feature layers through ArcSDE connections HOT 1
- arc.open() causes R to fatally abort HOT 27
- Create tagged release for 305 build HOT 1
- arc.open to ArcSDE throws "Error in .call_proxy("dataset.open", .Object, path) : cannot open dataset" HOT 1
- Error: package or namespace load failed for ‘arcgisbinding’: package ‘arcgisbinding’ was installed before R 4.0.0: please re-install it HOT 3
- Cannot install with R 4.3 HOT 10
- Please remove dependencies on **rgdal**, **sp**,**rgeos**, and/or **maptools** HOT 4
- Please add the support for convert the arc.raster object to SpatRaster object in terra package and stars object in stars package directly HOT 3
- Can't run python code in R from Quarto when arcgisbinding is loaded HOT 15
- POSIXct class assigned incorrectly HOT 5
- arc.portal_connect() or arc.check_portal() results in an "attempt to set an attribute on NULL" error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r-bridge.