When trying to create an sd draft file with <map object variable>.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", "nAmEblAH") I get the error "'Map' object has no attribute 'getWebLayerSharingDraft'". I'm following the example exactly as its shown here FeatureSharingDraft—Sharing module | ArcGIS Desktop and can't work out the issue. Is this a known bug? I'm using pro version 2.1.2.
That still does not address the issue of the error of:
name 'getWebLayerSharingDraft' is not defined
The arcpy.sharing module (containing getWebLayerSharingDraft) was introduced at ArcGIS Pro 2.2 to provide a better experience when sharing web layers over the previously existing function CreateWebLayerSDDraft. The original function is provided only for backward compatibility.
Introduction to arcpy.sharing—Sharing module | Documentation
Hello
Did you find any reason why this happens?
I am guessing it is because Arcgis Pro run Python 3.6 and ArcGis server still run under Python 2.7. But I am just guessing. I got lost among all those ESRI help online web pages.
I used CreateWebLayerSDDraft instead, it worled.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.