<?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 Stage Service writes to wrong folder in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626258#M48817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ArcGIS Pro Stage Service example (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/server/stage-service.htm#C_GUID-E4EE691D-C5C2-4F1C-BBC9-D600F4F8689E"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/server/stage-service.htm#C_GUID-E4EE691D-C5C2-4F1C-BBC9-D600F4F8689E&lt;/A&gt;) works, but it writes to Hosted folder??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;# Share to portal&lt;/SPAN&gt;&lt;BR /&gt;print(&lt;SPAN&gt;"Uploading Service Definition..."&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.UploadServiceDefinition_server(sd_output_filename, &lt;SPAN&gt;"My Hosted Services"&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I modified the following code from &amp;nbsp;&lt;SPAN&gt;"My Hosted Services" to "Maps".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The .sd file is published to the "Hosted" folder NOT the "Maps" folder??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How do I set the Folder to Maps??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Appreciate any assistance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Clive&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Dec 2019 14:59:08 GMT</pubDate>
    <dc:creator>CliveSwan</dc:creator>
    <dc:date>2019-12-20T14:59:08Z</dc:date>
    <item>
      <title>Stage Service writes to wrong folder</title>
      <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626258#M48817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ArcGIS Pro Stage Service example (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/server/stage-service.htm#C_GUID-E4EE691D-C5C2-4F1C-BBC9-D600F4F8689E"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/server/stage-service.htm#C_GUID-E4EE691D-C5C2-4F1C-BBC9-D600F4F8689E&lt;/A&gt;) works, but it writes to Hosted folder??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;# Share to portal&lt;/SPAN&gt;&lt;BR /&gt;print(&lt;SPAN&gt;"Uploading Service Definition..."&lt;/SPAN&gt;)&lt;BR /&gt;arcpy.UploadServiceDefinition_server(sd_output_filename, &lt;SPAN&gt;"My Hosted Services"&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I modified the following code from &amp;nbsp;&lt;SPAN&gt;"My Hosted Services" to "Maps".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The .sd file is published to the "Hosted" folder NOT the "Maps" folder??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How do I set the Folder to Maps??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Appreciate any assistance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Clive&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 14:59:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626258#M48817</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2019-12-20T14:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Stage Service writes to wrong folder</title>
      <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626259#M48818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From taking a quick glance, you need to be looking at the "Upload Service Definition" tool's parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/server/upload-service-definition.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/server/upload-service-definition.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Upload Service Definition—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You changed the in_server parameter which describes the server type. I would go read the info for that parameter and see which best fits your needs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get it to save in a different folder you have to set the "in_folder_type" parameter to "NEW" then specify the folder with the "in_folder" parameter. It is by default set to "IN_SERVICE_DEFINITION" which means it gets its folder location from the service definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the block of code that uploads the service definition might look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_sd_file &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sd_output_filename&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                     in_server &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"My Hosted Services"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                     in_folder_type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NEW"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                     in_folder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Maps"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested this so you're probably going to have to play around with it some to get it working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626259#M48818</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2021-12-12T02:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stage Service writes to wrong folder</title>
      <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626260#M48819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;I am using the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in_folder_type &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: rgba(255, 255, 255, 0.5); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #a67f59; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;"&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;EXSISTING&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;,&lt;/SPAN&gt;&lt;BR style="color: #000000; font-family: monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in_folder &lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: rgba(255, 255, 255, 0.5); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #a67f59; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #669900; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;"Maps"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I am trying to upload the Service to an existing folder called Maps.&lt;/P&gt;&lt;P&gt;The Service gets uploaded to a new Folder called "&lt;EM&gt;&lt;STRONG&gt;Hosted&lt;/STRONG&gt;&lt;/EM&gt;", not to an existing Folder called "&lt;STRONG&gt;Maps&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why it is not working as expected ie uploaded to &lt;STRONG&gt;Maps&lt;/STRONG&gt;??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;&lt;P&gt;PS I won't have access to ArcGIS Server till 06th January.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 19:52:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626260#M48819</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2019-12-20T19:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stage Service writes to wrong folder</title>
      <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626261#M48820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post your entire code so we can see it. Make sure to scrub out any sensitive information like server connections or account information. You can add your code by clicking the 3 dots that will say "Expand Toolbar" when you hover over the dots. Then click on "More" then on "Syntax Highlighter". When the Syntax Highlighter opens choose "Python" from the drop down menu at the top and paste your code in the main window.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 20:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626261#M48820</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2019-12-20T20:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Stage Service writes to wrong folder</title>
      <link>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626262#M48821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey i'm trying to publish a webmap from Arcgis pro to Online...&lt;/P&gt;&lt;P&gt;I keep getting this error message :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="box-sizing: border-box; color: #b22b31; font-weight: bold;"&gt;ExecuteError&lt;/SPAN&gt;: &lt;SPAN lang="en"&gt;Failed to execute. The parameters are not valid. ERROR 000732: Server: The My Hosted Services dataset does not exist or is not supported Failed to execute (UploadServiceDefinition).

Thank you for help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:41:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/stage-service-writes-to-wrong-folder/m-p/626262#M48821</guid>
      <dc:creator>inolaroch</dc:creator>
      <dc:date>2021-12-12T02:41:00Z</dc:date>
    </item>
  </channel>
</rss>

