AnsweredAssumed Answered

Error with function: arcpy.mp.CreateWebLayerSSDraft

Question asked by mhod on Feb 13, 2018
Latest reply on May 8, 2018 by mhod

I am trying to wirte a script that will update automatically my hosted feature services from ArcGIS Pro to ArcGIS Online via a python script. I am new to python but found this post that gives a detailed description of the script needed. 

Updating your hosted feature services with ArcGIS Pro and the ArcGIS API for Python | ArcGIS Blog 

I am trying to update the script to my needs so I changed the project path, sd_fs_name, user and password.  After running:

 

arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS','', True, True)

 

I get this error that I cannot figure out:

 

Traceback (most recent call last):
File "<string>", line 32, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\utils.py", line 191, in fn_
return fn(*args, **kw)
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\mp.py", line 105, in CreateWebLayerSDDraft
return _convertArcObjectToPythonObject(arcgisscripting._mapping.CreateWebLayerSDDraft(*_gp_fixargs([map_or_layers, out_sddraft, service_name, server_type, service_type, folder_name, overwrite_existing_service, copy_data_to_server, enable_editing, allow_exporting, enable_sync, summary, tags, description, credits, use_limitations], True)))
RuntimeError

 

In the blog comments others have had the same problem but no solution has yet been offered there so I am hoping I might get more information here. Running on ArcGIS Pro 2.1.

 

Thanks in advance!

Outcomes