<?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 [Linux] Mapx publishing to a mapservice in 10.6 with arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/linux-mapx-publishing-to-a-mapservice-in-10-6-with/m-p/113066#M8835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a mapservice published on my Portal with ArcGIS Pro, and I want to get a service definition file from it (.sd) with a python script (the final goal is to have a sd that could be published to other Portal environments).&lt;/P&gt;&lt;P&gt;My environment : Arcgis Enterprise 10.6 (&lt;SPAN style="text-decoration: underline;"&gt;I can't upgrade to a new version&lt;/SPAN&gt;) on a &lt;STRONG&gt;Linux&lt;/STRONG&gt; OS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With&amp;nbsp;this documentation (&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/10.6/administer/linux/linux-python.htm" title="https://enterprise.arcgis.com/en/server/10.6/administer/linux/linux-python.htm"&gt;The Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;), I installed python 3 environment, using particularly the following command :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;conda install -c esri arcgis-server-&lt;STRONG&gt;10.6&lt;/STRONG&gt;-py3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;as &lt;STRONG&gt;10.6&lt;/STRONG&gt; is my working version.&lt;/P&gt;&lt;P&gt;This environment is fully functional as I use ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already succeeded in doing the job on a Windows os (on which arcpy come from an ArcGIS Pro 2.4.0) :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I get mapx file in the published mapservice folder&lt;/LI&gt;&lt;LI&gt;I create ArcGIS Pro project in which I import the mapx file&lt;/LI&gt;&lt;LI&gt;I list maps in the ArcGIS Pro project, and I get a "service draft" with the "getweblayersharingdraft" method of Map object&lt;/LI&gt;&lt;LI&gt;Then stage service to get the sd file.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I execute the same script on my Linux environment, I get an error : &lt;SPAN style="background-color: #ffffff;"&gt;"'Map' object has no attribute 'getWebLayerSharingDraft'".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;And it is true : I checked source code and arcpy module included in the arcgis-server-10.6-py3 package is older than my ArcGIS Pro 2.4 and it does not provide the "&lt;SPAN&gt;getWebLayerSharingDraft" method.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;But it is present in the next version arcgis-server-10.6&lt;STRONG&gt;.1&lt;/STRONG&gt;-py3 package.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;I try to use it but my 10.6 licence seems to be not valid for that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Do you have any solution to my problem ? Is there a way to use the 10.6.1 version in my 10.6 environment ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Am I missing an other way to get the sd file ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thank you in advance for your help !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jan 2020 16:20:04 GMT</pubDate>
    <dc:creator>Pierre-MatthieuPETILLOT</dc:creator>
    <dc:date>2020-01-14T16:20:04Z</dc:date>
    <item>
      <title>[Linux] Mapx publishing to a mapservice in 10.6 with arcpy</title>
      <link>https://community.esri.com/t5/python-questions/linux-mapx-publishing-to-a-mapservice-in-10-6-with/m-p/113066#M8835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a mapservice published on my Portal with ArcGIS Pro, and I want to get a service definition file from it (.sd) with a python script (the final goal is to have a sd that could be published to other Portal environments).&lt;/P&gt;&lt;P&gt;My environment : Arcgis Enterprise 10.6 (&lt;SPAN style="text-decoration: underline;"&gt;I can't upgrade to a new version&lt;/SPAN&gt;) on a &lt;STRONG&gt;Linux&lt;/STRONG&gt; OS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With&amp;nbsp;this documentation (&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/10.6/administer/linux/linux-python.htm" title="https://enterprise.arcgis.com/en/server/10.6/administer/linux/linux-python.htm"&gt;The Python 3 runtime for ArcGIS Server on Linux—ArcGIS Server Administration (Linux) | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;), I installed python 3 environment, using particularly the following command :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;conda install -c esri arcgis-server-&lt;STRONG&gt;10.6&lt;/STRONG&gt;-py3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;as &lt;STRONG&gt;10.6&lt;/STRONG&gt; is my working version.&lt;/P&gt;&lt;P&gt;This environment is fully functional as I use ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already succeeded in doing the job on a Windows os (on which arcpy come from an ArcGIS Pro 2.4.0) :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I get mapx file in the published mapservice folder&lt;/LI&gt;&lt;LI&gt;I create ArcGIS Pro project in which I import the mapx file&lt;/LI&gt;&lt;LI&gt;I list maps in the ArcGIS Pro project, and I get a "service draft" with the "getweblayersharingdraft" method of Map object&lt;/LI&gt;&lt;LI&gt;Then stage service to get the sd file.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I execute the same script on my Linux environment, I get an error : &lt;SPAN style="background-color: #ffffff;"&gt;"'Map' object has no attribute 'getWebLayerSharingDraft'".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;And it is true : I checked source code and arcpy module included in the arcgis-server-10.6-py3 package is older than my ArcGIS Pro 2.4 and it does not provide the "&lt;SPAN&gt;getWebLayerSharingDraft" method.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;But it is present in the next version arcgis-server-10.6&lt;STRONG&gt;.1&lt;/STRONG&gt;-py3 package.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;I try to use it but my 10.6 licence seems to be not valid for that.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Do you have any solution to my problem ? Is there a way to use the 10.6.1 version in my 10.6 environment ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Am I missing an other way to get the sd file ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thank you in advance for your help !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2020 16:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linux-mapx-publishing-to-a-mapservice-in-10-6-with/m-p/113066#M8835</guid>
      <dc:creator>Pierre-MatthieuPETILLOT</dc:creator>
      <dc:date>2020-01-14T16:20:04Z</dc:date>
    </item>
  </channel>
</rss>

