I am facing similar problem using NET SDK. have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.6,I get below errors when running the application.I am not trying to Deploy yet.
- The application is running using developer license.The license is valid for development and testing only.
- Geoprocessor service failed.LocalServer start failed.executable not found.
What is the correct procedure to solve this ?
<SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">import</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> arcpy<BR /></SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">from</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> arcpy </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">import</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> env<BR /></SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">import</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> os<BR /><BR />env</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">workspace </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> arcpy</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">GetParameter</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="lit" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">0</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">)</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR />fcList </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> arcpy</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">ListFeatureClasses</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">()</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /><BR />text_file </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> open</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">"C:/Output242.txt"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">,</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">"w"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">)</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /></SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">for</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> fc </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">in</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> fcList</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">:</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">print</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> fc</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">rstrip</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">".shp"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">)</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> text_file</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">write</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">fc</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">rstrip</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">".shp"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">))</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /><BR />text_file</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">close</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">()</SPAN>
I am using the below code in C# NET for consuming this gpk service.
<SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">private</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">string</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> gpkPath </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">@</SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">"C:\Script2.gpk"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">;</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /></SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">private</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">string</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> gpUrl </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">string</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">Empty</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">;</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /><BR /></SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">private</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> async </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">void</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">StartLocalGpService</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">()</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /></SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">{</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">var</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> gpService </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">new</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">LocalGeoprocessingService</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">gpkPath</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">,</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"></SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">GeoprocessingServiceType</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">Execute</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">);</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> await gpService</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">StartAsync</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">();</SPAN><SPAN class="com" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #808080;">//Fails Here</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> gpUrl </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> gpService</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">.</SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">UrlGeoprocessingService</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">;</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">var</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> geoprocessor </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">=</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">new</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">Geoprocessor</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="kwd" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #00008b;">new</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"> </SPAN><SPAN class="typ" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2b91af;">Uri</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">(</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">gpUrl </SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">+</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"></SPAN><SPAN class="str" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;">"/Script2"</SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">));</SPAN><SPAN class="pln" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;"><BR /></SPAN><SPAN class="pun" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #000000;">}</SPAN>