<?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: Spatial join and attribute join failing since latest AGOL update in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805244#M2245</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: I think the problem might be related to using a View of the hosted features service rather than the HFS itself. However, the View was working before, so I'm still unsure if this is an issue from an upgrade to AGOL (from two weeks ago) or to the Py API as I recently switched to v1.5.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Mar 2019 18:47:15 GMT</pubDate>
    <dc:creator>TregChristopher</dc:creator>
    <dc:date>2019-03-29T18:47:15Z</dc:date>
    <item>
      <title>Spatial join and attribute join failing since latest AGOL update</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805243#M2244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Py API script running nightly that does a spatial join of wildlife observations to a&amp;nbsp;Township grid. Since Wednesday morning, this script has been failing (error messages below). I have also tried replacing the spatial join with just an attribute join (using code a month ago that was working then) and this too is failing. Then I tried do these two joins manually in a webmap and those jobs also failed. Any ideas of what is happening? Bug in AGOL update that affected the API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jupyter error on spatial join:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV style="padding: 0px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; display: flex; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; break-inside: avoid; flex-direction: row; align-items: stretch; background-color: #ffffff; -webkit-box-orient: horizontal; -webkit-box-align: stretch; text-decoration-color: initial; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial;"&gt;&lt;DIV style="padding: 0.4em; flex: 1 1 0%; text-align: left; color: #000000; line-height: 1.21em; -ms-overflow-x: auto; max-width: calc(100% - 14ex); box-sizing: border-box; -webkit-box-flex: 1;"&gt;&lt;PRE style="margin: 0px; padding: 1px 0px; border-radius: 0px; border: 0px currentColor; color: black; line-height: inherit; overflow: auto; font-family: monospace; font-size: inherit; vertical-align: baseline; display: block; white-space: pre-wrap; -ms-word-break: break-all; box-sizing: border-box; background-color: transparent; overflow-wrap: break-word;"&gt;Now spatial-joining (intersecting) obs layer to reference layer...&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="padding: 0px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; display: flex; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; break-inside: avoid; flex-direction: row; align-items: stretch; background-color: #ffffff; -webkit-box-orient: horizontal; -webkit-box-align: stretch; text-decoration-color: initial; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial;"&gt;&lt;DIV style="padding: 5px 1ex; width: 1ex; color: #333333; visibility: hidden; cursor: pointer; box-sizing: border-box;"&gt;&lt;/DIV&gt;&lt;DIV style="margin: 0px; padding: 0px 0.4em; text-align: right; line-height: 1.21em; font-family: monospace; cursor: default; min-width: 14ex; box-sizing: border-box; user-select: none;"&gt;&lt;/DIV&gt;&lt;DIV style="background: #ffdddd; padding: 0.4em; flex: 1 1 0%; text-align: left; color: #000000; line-height: 1.21em; -ms-overflow-x: auto; max-width: calc(100% - 14ex); box-sizing: border-box; -webkit-box-flex: 1;"&gt;&lt;PRE style="margin: 0px; padding: 1px 0px; border-radius: 0px; border: 0px currentColor; color: black; line-height: inherit; overflow: auto; font-family: monospace; font-size: inherit; vertical-align: baseline; display: block; white-space: pre-wrap; -ms-word-break: break-all; box-sizing: border-box; background-color: transparent; overflow-wrap: break-word;"&gt;{"messageCode": "AO_100215", "message": "JoinFeatures failed."} Failed to execute (JoinFeatures). Failed.&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Py script error on spatial join:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&amp;nbsp;&amp;nbsp; flcJoinResult = join_features(target_layer, join_layer,spatial_relationship='intersects',spatial_relationship_distance=None, spatial_relationship_distance_units=None, attribute_relationship=None, join_operation='JoinOneToMany', summary_fields=None, output_name=new_fs_name, context=None, gis=None)&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\summarize_data.py", line 305, in join_features&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&amp;nbsp;&amp;nbsp; context)&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\tools.py", line 1071, in join_features&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&amp;nbsp;&amp;nbsp; job_info = super()._analysis_job_status(task_url, job_info)&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\tools.py", line 188, in _analysis_job_status&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&amp;nbsp;&amp;nbsp; raise Exception("Job failed.")&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;Exception: Job failed.&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;Spatial join failed in webmap too&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/440206_Capture.GIF" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 23:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805243#M2244</guid>
      <dc:creator>TregChristopher</dc:creator>
      <dc:date>2019-03-22T23:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial join and attribute join failing since latest AGOL update</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805244#M2245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: I think the problem might be related to using a View of the hosted features service rather than the HFS itself. However, the View was working before, so I'm still unsure if this is an issue from an upgrade to AGOL (from two weeks ago) or to the Py API as I recently switched to v1.5.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 18:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805244#M2245</guid>
      <dc:creator>TregChristopher</dc:creator>
      <dc:date>2019-03-29T18:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial join and attribute join failing since latest AGOL update</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805245#M2246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: as a work around to the bug that prevents me from using a View (from a Hosted Feature Layer) in geo-processing (spatial join), I've switched to using a feature collection.&lt;/P&gt;&lt;P&gt;Code to transform from feature layer to feature collection (with feature set in between) is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;items = gis.content.get('ItemID here')&lt;BR /&gt;lyrObs = items.layers[0]&lt;/P&gt;&lt;P&gt;fsetObsSensitiveLoc = lyrObs.query(where='IsSensitiveLoc=10')&lt;BR /&gt;fcollObsSensitiveLoc = FeatureCollection(fsetObsSensitiveLoc.to_dict())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 23:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/spatial-join-and-attribute-join-failing-since/m-p/805245#M2246</guid>
      <dc:creator>TregChristopher</dc:creator>
      <dc:date>2019-03-29T23:16:30Z</dc:date>
    </item>
  </channel>
</rss>

