<?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: Get JSON response with ArcGIS API for Python in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1564950#M60371</link>
    <description>&lt;P&gt;Alternatively, add a line of python to run the query against the layer, then if results exist create the report / else return a message saying the object was not found?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2024 23:00:12 GMT</pubDate>
    <dc:creator>ChristopherCounsell</dc:creator>
    <dc:date>2024-12-04T23:00:12Z</dc:date>
    <item>
      <title>Get JSON response with ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1564618#M60358</link>
      <description>&lt;P&gt;I have a script to generate Survey123 feature reports, I used this method to create it:&amp;nbsp;&lt;A href="https://developers.arcgis.com/survey123/guide/create-reports-using-the-arcgis-api-for-python/" target="_self"&gt;https://developers.arcgis.com/survey123/guide/create-reports-using-the-arcgis-api-for-python/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I want to be able to access some of the information that you see in the "recent reports" section of the Survey123 web app. Mostly, I want to get the 'messages' section and incorporate that into the script for debugging.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesTurner2_0-1733315761154.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120865iB72EA59DE2212566/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesTurner2_0-1733315761154.png" alt="JamesTurner2_0-1733315761154.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the above example, in my script the only output I receive is:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: KeyError:  'NoneType' object has no attribute 'seek'  (related to ESRI BUG-000119057)&lt;/PRE&gt;&lt;P&gt;It is not all that helpful, but when I go to the recent reports page in the web app, I see that the actual problem is that the query I used returned no results. So I want to be able to display these messages in my script.&lt;/P&gt;&lt;P&gt;It looks like this information is available in the JSON response if you are using the Rest API, but maybe not with ArcGIS API for Python? I might have terms confused here, I don't have grasp between the difference of&amp;nbsp;ArcGIS API for Python and the REST API&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 12:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1564618#M60358</guid>
      <dc:creator>JamesTurner2</dc:creator>
      <dc:date>2024-12-04T12:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get JSON response with ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1564950#M60371</link>
      <description>&lt;P&gt;Alternatively, add a line of python to run the query against the layer, then if results exist create the report / else return a message saying the object was not found?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 23:00:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1564950#M60371</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2024-12-04T23:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get JSON response with ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1565143#M60381</link>
      <description>&lt;P&gt;Thanks, that's a good alternative. I'm not sure what other kinds of messages might appear in the JSON and if they would be helpful, but this is a good work around for the time being and a good way to catch one of the possible errors. Thanks for the input!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 14:44:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-json-response-with-arcgis-api-for-python/m-p/1565143#M60381</guid>
      <dc:creator>JamesTurner2</dc:creator>
      <dc:date>2024-12-05T14:44:19Z</dc:date>
    </item>
  </channel>
</rss>

