I'm getting an error when I call the following:
survey_manager = SurveyManager(gis)
survey = survey_manager.create(title="Accommodation_inspection")
survey.publish(excel_file, create_web_form=True, enable_sync=True, create_web_map=True, schema_changes=True)
The gis variable is an instance of GIS connected with user that has capability to create and publish surveys
The Excel file used can be opened with Survey123 Connect application and validated
I've tried several things, eg. using a predefined info dictionary and setting the arguments for the publish arguments, but with same result.
The error is:
{'code': 500, 'message': "Spatial reference of layer 'Accommodation_inspection' must be the same as defined by the service.", 'details': []}
I've debugged within the Python library and it looks like it's hardcoded using default wkid 102100. But this is deprecated, so I don't understand why this is used. See in file C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\apps\survey123\_publish_functions.py line 802
Any help is greatly appreciated