Hello,
In Arcpro Jupyter Notebook, I am trying to get a map widget with data from our local system/network. My code is:
from arcgis.gis import GIS
gis = GIS("pro")
from arcgis.widgets import MapView
MapView.set_js_cdn("https://js.arcgis.com/4.18/")
map1 = gis.map("macon, GA")
map1.basemap = "topo"
map1.add_layer("N:\name\shp\shapefile.shp")
map1
I am getting the following error:
RuntimeError Traceback (most recent call last)
In [14]:
Line 8: map1.add_layer("N:\name\shp\shapefile.shp")
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\widgets\_mapview\_mapview.py, in add_layer:
Line 1153: self._add_layer_to_widget(item, options)
File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\widgets\_mapview\_mapview.py, in _add_layer_to_widget:
Line 1263: raise RuntimeError("Cannot infer layer: will not be added to map")
RuntimeError: Cannot infer layer: will not be added to map
What does this error mean, and how do I fix it? Also, where is some good documentation on errors that occurs in Jupyter Notebooks?
Again I am just trying to gain familiarity with Jupyter in Arcpro. The ability to use our data in a Jupyter Notebook will be essential to any applications of the feature.
Arc Pro: 2.7
Thank you,
Laura