[Python API] survey.generate_report(template, '1=1')

230
0
11-18-2019 07:29 PM
GIS_AdminHorizons
New Contributor II

I am trying to use the python API with request "survey.generate_report(template, '1=1')" but get an

error code 403

Request not made over ssl

any suggestions? it is failing line 244 in C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\survey123\_survey.py

input: survey.generate_report(template, '1=1')

output:

---------------------------------------------------------------------------RuntimeError                              Traceback (most recent call last)<ipython-input-35-4b4f049a458b> in <module>----> 1 survey.generate_report(template, '1=1')C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\survey123\_survey.py in generate_report(self, report_template, where, utc_offset, report_title, folder_id)    242                                               )    243         #1). Submit the request.--> 244         submit = self._si._gis._con.post(url, params)    245         return self._check_status(res=submit, status_type='generate_report')    246     #----------------------------------------------------------------------C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py in post(self, path, postdata, files, ssl, compress, is_retry, use_ordered_dict, add_token, verify_cert, token, try_json, out_folder, file_name, force_bytes, add_headers)   1175                                          verify_cert=verify_cert, is_retry=True)   1176 -> 1177                 self._handle_json_error(resp_json['error'], errorcode)   1178                 return None   1179  C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\_impl\connection.py in _handle_json_error(self, error, errorcode)   1196    1197         errormessage = errormessage + "\n(Error Code: " + str(errorcode) +")"-> 1198         raise RuntimeError(errormessage)   1199    1200 class _StrictURLopener(request.FancyURLopener):RuntimeError: Request not made over ssl (Error Code: 403)
0 Kudos
0 Replies