<?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: Generate Survey123 Report in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/1086155#M6437</link>
    <description>&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;Not sure if this would make a difference or not but have you tried passing your where_filter variable into the survey.generate_report function as a parameter? Instead of using the SQL statement as the parameter.&lt;/P&gt;&lt;P&gt;I would also double check your use of the "created_date" field and make sure it's the correct field both in it being a date/time object and that the name is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where_filter = "created_date &amp;gt;= CURRENT_TIMESTAMP - INTERVAL '100' DAY"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;survey.generate_report(surveytemplate, where_filter)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, maybe try a different day interval and see if it's the use of 100 days that's throwing it off? Maybe try 7 and see if that works?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 14:17:42 GMT</pubDate>
    <dc:creator>BHeist</dc:creator>
    <dc:date>2021-08-05T14:17:42Z</dc:date>
    <item>
      <title>Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777175#M999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really excited about the latest Python API update. Would like to be able to export survey responses as reports with Python. I'm currently stuck at this part. I can see that the reports get generated and I can download them (image below from Survey123 website), but I receive an error in the code: KeyError: 'results' (see attachment). I'm also curious if you can access the generated reports directly with Python after making them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 j-img-centered jive-image" src="https://community.esri.com/legacyfs/online/429868_pastedImage_1.png" style="margin-left: auto; margin-right: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777175#M999</guid>
      <dc:creator>ChelseaRozek</dc:creator>
      <dc:date>2018-11-28T17:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777176#M1000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chelsea, I wondered if you or anyone else had made any further progress with this. I encountered the same error (although the outputted Word documents seem OK), and I'm also having a hard time figuring out the syntax to use in place of '1=1' if I'm trying to only generate records for a subset of the features in the feature layer. Any pointers / examples appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 20:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777176#M1000</guid>
      <dc:creator>MatthewCarey</dc:creator>
      <dc:date>2019-02-21T20:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777177#M1001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear someone else is trying to do this. I haven't found a solution yet. Are you saying the output was fine from the Survey123 website? You aren't able to access the output in Python, are you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 20:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777177#M1001</guid>
      <dc:creator>ChelseaRozek</dc:creator>
      <dc:date>2019-02-21T20:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777178#M1002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, no I'm not able to access the output in Python. For my workflow I'm OK with having the resulting reports be available in AGOL, but I would like to be able only run it for a subset of the features, not all of them.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2019 14:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777178#M1002</guid>
      <dc:creator>MatthewCarey</dc:creator>
      <dc:date>2019-02-22T14:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777179#M1003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I figured your issue out. By default with 1=1 (aka always true), I'm generating 3 reports because there are 3 completed surveys. The error I posted above shows that we're calling _survey.py to run generate_report(). In that .py, it says if where == "1=1": where = {"where":"1=1"} then it uses it like that. So when I put in my code a where statement that was valid and returned only 1 record when using Query under Supported Operations on the Service URL (link on the item's page in AGO), like this in my code: letslearn.generate_report(choice, &lt;STRONG&gt;{"where":"brandname='Fan'"}&lt;/STRONG&gt;), only 1 report was generated. Still got my KeyError: 'results', but on the Survey123 website under Report&amp;gt;Recent Tasks&amp;gt;only 1 record in the last task.&amp;nbsp; Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2019 17:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777179#M1003</guid>
      <dc:creator>ChelseaRozek</dc:creator>
      <dc:date>2019-02-22T17:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777180#M1004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes!!! Thank you, that worked for me. I'm still getting the&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;KeyError: 'results' but this did the trick for the 'where' part. Thanks for delving deeper into it, much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2019 19:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777180#M1004</guid>
      <dc:creator>MatthewCarey</dc:creator>
      <dc:date>2019-02-22T19:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777181#M1005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;: I put in a support ticket and there is an existing bug:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 11.0pt; "&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;BUG-000119057&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt;"&gt; : The Python API 1.5.2 generate_report method of the arcgis.apps.survey123 module, generates the following error: KeyError: 'results'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I was playing with a workaround, where you basically just search for the generated reports in your organization and download them. I also delete them after downloading them so future runs wouldn't re-download them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #6a9955;"&gt;#this script generates the KeyError: 'results' but still works&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; arcgis.gis &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; GIS&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; zipfile &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; ZipFile&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; arcgis.apps.survey123._survey &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; SurveyManager, Survey&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;gis &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; GIS(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"https://YOURORGANIZATION.maps.arcgis.com"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"USERNAME"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"PASSWORD"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#fill in 3 strings here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;survey_mgr &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; SurveyManager(gis)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;letslearn &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; survey_mgr.get(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"id for survey form item in AGO"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#fill in 1 string here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #dcdcaa;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(letslearn.report_templates) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#see all available print templates for this survey&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;choice &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; letslearn.report_templates[&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#the print template you want to use (0 = first); fill in 1 number here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #dcdcaa;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(choice)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #6a9955;"&gt;#example syntax for generate report for some features: letslearn.generate_report(choice, {"where":"fieldname='fieldvalueyouwant'"})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;letslearn.generate_report(choice, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"1=1"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#generates report for all features&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV style="font-weight: normal;"&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #6a9955;"&gt;#print(letslearn.reports)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; x &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; letslearn.reports: &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#finds all Microsoft Word doc files in AGO with you as their owner and "Survey 123" in the tags. Could upload a Word document that wasn't a generated report, add that tag, and it would be found with this&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#print(x.description) remove "#" if you want to see them listed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; x.description: &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#if it exists.. (some of my old generated reports had null descriptions)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'id for survey form item in AGO'&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; x.description: &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#fill in 1 string here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;id&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; x.id &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#get id of that Word doc&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data_item &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; gis.content.get(&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#get Word doc as an item from AGO&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data_item.download(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;save_path&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;r&lt;/SPAN&gt;&lt;SPAN style="color: #d16969;"&gt;'C:\where&lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\e&lt;/SPAN&gt;&lt;SPAN style="color: #d16969;"&gt;ver&lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\y&lt;/SPAN&gt;&lt;SPAN style="color: #d16969;"&gt;ou\want&lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\i&lt;/SPAN&gt;&lt;SPAN style="color: #d16969;"&gt;t'&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#fill in 1 string here; downloads that Word doc&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data_item.delete() &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;#deletes that Word doc&amp;nbsp;in AGO&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:50:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777181#M1005</guid>
      <dc:creator>ChelseaRozek</dc:creator>
      <dc:date>2019-02-25T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777182#M1006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chelsea,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly thank you for the code sample, this led me in the right direction for automating report creation with Python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took your code and added more functionality to it, which now generates reports for submissions from the last 24hrs, downloads the docx files, retrieves email addresses collected via survey, and sends a copy of the relevant docx file to the recipient as an email attachment.&amp;nbsp; It also has a workaround try/except block for the known bug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sharing it here as others may find it useful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/nzjs/Automated-Survey123-Reports"&gt;https://github.com/nzjs/Automated-Survey123-Reports&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2019 22:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777182#M1006</guid>
      <dc:creator>JohnStowell</dc:creator>
      <dc:date>2019-03-06T22:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777183#M1007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! I really love your work, but I have a question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please explain to us how works the block try/except/finally to omit the KeyError?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 19:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777183#M1007</guid>
      <dc:creator>DannielaCardenas</dc:creator>
      <dc:date>2019-04-05T19:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777184#M1008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, the try/except/finally block is built into Python as a way of handling exceptions.&lt;/P&gt;&lt;P&gt;In this instance we expect the KeyError exception bug (try/except) and&amp;nbsp;tell the script to continue on after it occurs (finally).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2019 20:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777184#M1008</guid>
      <dc:creator>JohnStowell</dc:creator>
      <dc:date>2019-04-09T20:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777185#M1009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;This is really helpful thank you for sharing I'm trying to hopefully use this for our workflow but I keep running into this error maybe someone can help. I made sure to download the other python libraries but looking at the docx.py I'm not sure what's going on. Any help is much appreciated&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/447496_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2019 21:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777185#M1009</guid>
      <dc:creator>KassandraRodriguez</dc:creator>
      <dc:date>2019-05-13T21:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777186#M1010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kassandra, I think this could be related to your version of the docx&amp;nbsp;library?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Python 3.x, you need the &lt;STRONG&gt;python-docx&lt;/STRONG&gt; library rather than &lt;STRONG&gt;docx&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;These links have more info:&amp;nbsp;&lt;A href="https://pypi.org/project/python-docx/"&gt;https://pypi.org/project/python-docx/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/22765313/when-import-docx-in-python3-3-i-have-error-importerror-no-module-named-excepti"&gt;https://stackoverflow.com/questions/22765313/when-import-docx-in-python3-3-i-have-error-importerror-no-module-named-excepti&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try uninstalling the old one, install python-docx, then see how that&amp;nbsp;goes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2019 22:10:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777186#M1010</guid>
      <dc:creator>JohnStowell</dc:creator>
      <dc:date>2019-05-13T22:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777187#M1011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John, That was it thank you for your help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2019 16:07:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777187#M1011</guid>
      <dc:creator>KassandraRodriguez</dc:creator>
      <dc:date>2019-05-14T16:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777188#M1012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kassandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you share how you are importing the python-docx module. I keep getting an error in my script saying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import python-docx&lt;BR /&gt; File "&amp;lt;ipython-input-6-d71ba5c26d0b&amp;gt;", line 1&lt;BR /&gt; import python-docx&lt;BR /&gt; ^&lt;BR /&gt;SyntaxError: invalid syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2019 22:55:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777188#M1012</guid>
      <dc:creator>SimonAllard2</dc:creator>
      <dc:date>2019-11-12T22:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777189#M1013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My problem was that I was using the wrong version of python&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which was&amp;nbsp;2.7, so I still used:&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; margin: 0.5em 0px; padding: 1em;"&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;import&lt;/SPAN&gt; docx&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;but I think your asking how to install the library? This video should help with that&amp;nbsp;&lt;A class="" href="https://youtu.be/Ju6zw83PoKo" style="color: #2989c5; text-decoration: none;" title="https://youtu.be/Ju6zw83PoKo"&gt;Install Python with Matplotlib, Numpy+MKL, and SciPy - YouTube&lt;/A&gt;&amp;nbsp; you would just replace it with&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #eeeeee; border: 1px solid #cccccc; font-size: 0.95em; padding: 0.5em;"&gt;&lt;SPAN class=""&gt;pip&lt;/SPAN&gt; &lt;SPAN class=""&gt;install&lt;/SPAN&gt; &lt;SPAN class=""&gt;python&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666666;"&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt;docx&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;let me know if that answers your question&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 17:23:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777189#M1013</guid>
      <dc:creator>KassandraRodriguez</dc:creator>
      <dc:date>2019-11-13T17:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777190#M1014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kassandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PyCharms IDE with a python virtual environment. When adding python-docx from pipy repository I am getting a invalid ssl certificate error. I think this is an issue with my internal firewall so I have contacted my it department. I tried adding a ssl certificate to list of those trusted in pycharms but that hasn’t worked either. Strange tho that I was able to upgrade the pip and requests modules but not able to add python-docx?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon Allard&lt;/P&gt;&lt;P&gt;GIS Analyst&lt;/P&gt;&lt;P&gt;Bay of Plenty Regional Council Toi Moana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 22:22:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777190#M1014</guid>
      <dc:creator>SimonAllard2</dc:creator>
      <dc:date>2019-11-14T22:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777191#M1015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/331648"&gt;Kassandra Rodriguez&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had tried all sorts of things but in the end it was the firewall on our corporate network! We finally got it sorted though and I am working through the script to generate reports. I am having a bit of trouble with a couple lines of code - one is specifying the "where" filter variable and applying this in the 'generate reports module'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #ebebeb; background-color: #131314; font-size: 9.8pt;"&gt;&lt;PRE style="font-size: 9.8pt;"&gt;&lt;SPAN style="color: #7ec3e6;"&gt;where_filter = '{"where":"CreationDate &amp;gt;= CURRENT_TIMESTAMP - INTERVAL \'1\' DAY"}'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;PRE style="color: #ebebeb; background-color: #131314; font-size: 9.8pt;"&gt;survey.generate_report(template&lt;SPAN style="color: #ed864a; font-weight: bold;"&gt;, &lt;/SPAN&gt;where_filter&lt;SPAN style="color: #ed864a; font-weight: bold;"&gt;, &lt;/SPAN&gt;utc_offset&lt;SPAN style="color: #ed864a; font-weight: bold;"&gt;, &lt;/SPAN&gt;report_title)&lt;/PRE&gt;&lt;P&gt;The script runs but doesn't return any surveys. I have only succeeded when use 1=1 which returns all reports!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested the sql query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475643" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/475643_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which returned results but only when the sql format was set to standard from none.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/475644_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 03:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777191#M1015</guid>
      <dc:creator>SimonAllard2</dc:creator>
      <dc:date>2019-12-09T03:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777192#M1016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Simon sorry I can't help with this, we ended up going with the out of the box feature reports. I'd ask&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/351169"&gt;John Stowell&lt;/A&gt;&amp;nbsp;for further help&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 16:22:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777192#M1016</guid>
      <dc:creator>KassandraRodriguez</dc:creator>
      <dc:date>2019-12-09T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777193#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'm using your script and I'm getting this error, do you know why?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/482245_PyError.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 16:37:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777193#M1017</guid>
      <dc:creator>MichelleWilliams1</dc:creator>
      <dc:date>2020-02-14T16:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Survey123 Report</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777194#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I installed&amp;nbsp;smtplib, python-docx, and&amp;nbsp;glob but I'm still getting this error. Is it my firewall giving me problems?&lt;/P&gt;&lt;P&gt;I might need to download to a folder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 19:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/generate-survey123-report/m-p/777194#M1018</guid>
      <dc:creator>MichelleWilliams1</dc:creator>
      <dc:date>2020-02-14T19:29:41Z</dc:date>
    </item>
  </channel>
</rss>

