<?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 Python hosted notebooks on runtime 3.11 and 3.12 returns duplicated records using layer query method in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-hosted-notebooks-on-runtime-3-11-and-3-12/m-p/1669398#M11799</link>
    <description>&lt;P&gt;Recently I was made to update a hosted notebook (which checked for duplicated Ids) in ArcGIS Online from 3.9 and now the feature layer query method does not function correctly, returning duplicated records and missing other records.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;featSet = layer.query(where="AssetId IS NOT NULL", out_fields=['AssetId'], return_geometry=False)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; If i do a quick check with pandas it is returning duplicated OBJECTIDs:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;indupeFset.sdf.OBJECTID.value_counts()

Out[25]: 
OBJECTID
343224    2
338906    2
333839    2
333840    2
333841    2
         ..
3493      1
3494      1
3495      1
3496      1
367214    1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have replicated this on both runtimes 3.11 and 3.12 (advanced). it seems similar to this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en-us/bug/in-arcgis-api-for-python-23-and-24-a-query-on-a-referen-bug-000171499" target="_blank"&gt;https://support.esri.com/en-us/bug/in-arcgis-api-for-python-23-and-24-a-query-on-a-referen-bug-000171499&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the behavior described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/duplicate-records-returned-by-python-api-since/td-p/1548638" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/duplicate-records-returned-by-python-api-since/td-p/1548638&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;but it is happening in a hosted notebook, and not in an oracle map service.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Dec 2025 18:14:20 GMT</pubDate>
    <dc:creator>jtmouw_NCDOT</dc:creator>
    <dc:date>2025-12-01T18:14:20Z</dc:date>
    <item>
      <title>Python hosted notebooks on runtime 3.11 and 3.12 returns duplicated records using layer query method</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-hosted-notebooks-on-runtime-3-11-and-3-12/m-p/1669398#M11799</link>
      <description>&lt;P&gt;Recently I was made to update a hosted notebook (which checked for duplicated Ids) in ArcGIS Online from 3.9 and now the feature layer query method does not function correctly, returning duplicated records and missing other records.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;featSet = layer.query(where="AssetId IS NOT NULL", out_fields=['AssetId'], return_geometry=False)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; If i do a quick check with pandas it is returning duplicated OBJECTIDs:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;indupeFset.sdf.OBJECTID.value_counts()

Out[25]: 
OBJECTID
343224    2
338906    2
333839    2
333840    2
333841    2
         ..
3493      1
3494      1
3495      1
3496      1
367214    1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have replicated this on both runtimes 3.11 and 3.12 (advanced). it seems similar to this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en-us/bug/in-arcgis-api-for-python-23-and-24-a-query-on-a-referen-bug-000171499" target="_blank"&gt;https://support.esri.com/en-us/bug/in-arcgis-api-for-python-23-and-24-a-query-on-a-referen-bug-000171499&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the behavior described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/duplicate-records-returned-by-python-api-since/td-p/1548638" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/duplicate-records-returned-by-python-api-since/td-p/1548638&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;but it is happening in a hosted notebook, and not in an oracle map service.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 18:14:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-hosted-notebooks-on-runtime-3-11-and-3-12/m-p/1669398#M11799</guid>
      <dc:creator>jtmouw_NCDOT</dc:creator>
      <dc:date>2025-12-01T18:14:20Z</dc:date>
    </item>
  </channel>
</rss>

