I have a script to generate Survey123 feature reports, I used this method to create it: https://developers.arcgis.com/survey123/guide/create-reports-using-the-arcgis-api-for-python/
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.
With the above example, in my script the only output I receive is:
ERROR: KeyError: 'NoneType' object has no attribute 'seek' (related to ESRI BUG-000119057)
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.
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 ArcGIS API for Python and the REST API
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?
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!