<?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 Re: Error: 001369 when publishing Geoprocessing Service with File output on ArcGIS Server 10.7.1 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-001369-when-publishing-geoprocessing-service/m-p/521561#M22896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently, arcpy.env.packageWorkspace is not the ideal way to define tool output folders, I used arcpy.env.scratchFolder instead:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

input_from_client &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
file_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchFolder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file_path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"w"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_from_client&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetParameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&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;/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;That does not fix the 001369 Error though. The solution for me was&lt;/P&gt;&lt;P&gt;1. Create a new Project&lt;/P&gt;&lt;P&gt;2. Create a&amp;nbsp;new Script in the Project's toolbox which uses the above script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, it was possible to publish the service successfully&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:45:05 GMT</pubDate>
    <dc:creator>LukasWürsch</dc:creator>
    <dc:date>2021-12-11T22:45:05Z</dc:date>
    <item>
      <title>Error: 001369 when publishing Geoprocessing Service with File output on ArcGIS Server 10.7.1</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-001369-when-publishing-geoprocessing-service/m-p/521560#M22895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally, it&amp;nbsp;should be&amp;nbsp;possible to create a geoprocessing-service which creates a text file with the script below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
&lt;SPAN class="comment token"&gt;# input variable of type String&lt;/SPAN&gt;
input_from_client &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
file_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;packageWorkspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file_path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"w"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_from_client&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Output variable of type file&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetParameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&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;/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;A service created with the&amp;nbsp;above code&amp;nbsp;can be published without problems to&amp;nbsp;ArcGIS Server&amp;nbsp;&lt;SPAN&gt;10.6.1 But when I try to publish the same service on a Machine with&amp;nbsp;ArcGIS Server 10.7.1, I get the following error(s):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;WARNING	15 Oct 2020 14:51:50	Thumbnail is not avaliable on this layer Conservation_forest_province	Rest
SEVERE	15 Oct 2020 14:51:43	Error executing tool. PublishServiceDefinition Job ID: j323c6e9585524bc7973f7b1cd3f948f8 : ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). Failed. Failed to execute (Publish Service Definition).	System/PublishingTools.GPServer
SEVERE	15 Oct 2020 14:51:43	Delegate job failed.	System/PublishingTools.GPServer
SEVERE	15 Oct 2020 14:51:41	Error executing tool. PublishServiceDefinition Job ID: j267b052ffdcd47e5bcda9064e9e151df : ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition).	System/PublishingToolsEx.GPServer
SEVERE	15 Oct 2020 14:51:41	Failed to create the service.	System/PublishingToolsEx.GPServer
SEVERE	15 Oct 2020 14:51:41	Failed generating the service definition name mapping.	System/PublishingToolsEx.GPServer
SEVERE	15 Oct 2020 14:51:41	Failed to add the dbMapping object.	System/PublishingToolsEx.GPServer
SEVERE	15 Oct 2020 14:51:41	Failed to add the dsMapping object.	System/PublishingToolsEx.GPServer
SEVERE	15 Oct 2020 14:51:41	Invalid manifest. Unable to find dataset in extracted geodatabase.	System/PublishingToolsEx.GPServer
WARNING	15 Oct 2020 14:51:29	Metadata is not avaliable on this layer Conservation_forest_province	Rest&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;/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;Any idea&amp;nbsp;what I&amp;nbsp;can try to make it work on the 10.7.1 Server as well? Is it possible that I have to define the file path differently?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be very thankful for help or advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:45:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-001369-when-publishing-geoprocessing-service/m-p/521560#M22895</guid>
      <dc:creator>LukasWürsch</dc:creator>
      <dc:date>2021-12-11T22:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error: 001369 when publishing Geoprocessing Service with File output on ArcGIS Server 10.7.1</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-001369-when-publishing-geoprocessing-service/m-p/521561#M22896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently, arcpy.env.packageWorkspace is not the ideal way to define tool output folders, I used arcpy.env.scratchFolder instead:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

input_from_client &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
file_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchFolder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;file_path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"w"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_from_client&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetParameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; text_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&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;/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;That does not fix the 001369 Error though. The solution for me was&lt;/P&gt;&lt;P&gt;1. Create a new Project&lt;/P&gt;&lt;P&gt;2. Create a&amp;nbsp;new Script in the Project's toolbox which uses the above script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, it was possible to publish the service successfully&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-001369-when-publishing-geoprocessing-service/m-p/521561#M22896</guid>
      <dc:creator>LukasWürsch</dc:creator>
      <dc:date>2021-12-11T22:45:05Z</dc:date>
    </item>
  </channel>
</rss>

