<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RuntimeError error when loading local data to the map widget. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035915#M60365</link>
    <description>&lt;P&gt;JeffK&lt;/P&gt;&lt;P&gt;Thanks for the Explanation. Do you know where I can find documentation on the errors.&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 13:52:42 GMT</pubDate>
    <dc:creator>Laura_m_Conner</dc:creator>
    <dc:date>2021-03-12T13:52:42Z</dc:date>
    <item>
      <title>RuntimeError error when loading local data to the map widget.</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035685#M60343</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In Arcpro Jupyter Notebook, I am trying to get a map widget with data from our local system/network. My code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does this error mean, and how do I fix it? Also, where is some good documentation on errors that occurs in Jupyter Notebooks?&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Arc Pro: 2.7&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 21:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035685#M60343</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2021-03-11T21:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError error when loading local data to the map widget.</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035764#M60346</link>
      <description>&lt;P&gt;You are trying to add a layer that ArcGIS for Python API doesn't understand.&amp;nbsp; The documentation for add_layer requires&lt;/P&gt;&lt;P&gt;Layer objects such as FeatureLayer, MapImageLayer, ImageryLayer etc.&lt;/P&gt;&lt;P&gt;Item objects and FeatureSet and FeatureCollections&lt;/P&gt;&lt;P&gt;Table objects&lt;/P&gt;&lt;P&gt;which are referring to web based/ hosted types of data... I know you can access local featureclasses/ data for analysis and the like, but I don't think it extends to webmap widgets. You could host that shapefile in AGOL and access it that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 00:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035764#M60346</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-12T00:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError error when loading local data to the map widget.</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035915#M60365</link>
      <description>&lt;P&gt;JeffK&lt;/P&gt;&lt;P&gt;Thanks for the Explanation. Do you know where I can find documentation on the errors.&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 13:52:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1035915#M60365</guid>
      <dc:creator>Laura_m_Conner</dc:creator>
      <dc:date>2021-03-12T13:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeError error when loading local data to the map widget.</title>
      <link>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1036628#M60405</link>
      <description>&lt;P&gt;Sorry for the delay-&amp;nbsp; I don't think ESRI keeps a repo of all the errors, at least any that are publicly accessible. &lt;A href="https://community.esri.com/t5/python-questions/where-is-the-list-of-geoprocessing-error-codes/m-p/1028865/highlight/true#M60039" target="_self"&gt;This thread&lt;/A&gt; might provide you some answers on what error codes are there, how to get a list of them and since they keep the codes consistent across the platform (maybe?), you can probably search for the code and get the documentation for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 14:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtimeerror-error-when-loading-local-data-to-the/m-p/1036628#M60405</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-15T14:34:53Z</dc:date>
    </item>
  </channel>
</rss>

