<?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: Geoprocessing Service Runs But Doesn't Produce Output in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684465#M26105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd, I removed the assumed....so treat as a question again.&amp;nbsp; btw, how you do that is to mark one as correct and then unmark it right away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2017 20:44:55 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2017-01-30T20:44:55Z</dc:date>
    <item>
      <title>Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684461#M26101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I've created a geoprocessing Python script tool that I've published as a GP service. This script takes lat/lon coordinates, extracts data from a raster from these coordinates, outputs a .csv and creates an Excel chart from a .vbs script. I can run the Python script on our server from the "C:\arcgisserver\directories\arcgissystem\arcgisinput" path and it works. I'm trying to test the GP service (Execute Task (GET)) &amp;nbsp;from a browser on our REST services page. It says it's successful, but it doesn't actually output the chart. It does create the .csv, but it doesn't run the .vbs script. Here is the result message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;{
 "results": [],
 "messages": [
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Executing (ChartTest): ChartTest 45 -122 Portland"
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Start Time: Wed Jan 25 13:51:23 2017"
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Executing (ChartTest): ChartTest 45 -122 Portland"
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Start Time: Wed Jan 25 13:51:23 2017"
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Running script ChartTest..."
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Completed script ChartTest..."
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Succeeded at Wed Jan 25 13:51:23 2017 (Elapsed Time: 0.70 seconds)"
&amp;nbsp; },
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; "type": "esriJobMessageTypeInformative",
&amp;nbsp;&amp;nbsp; "description": "Succeeded at Wed Jan 25 13:51:23 2017 (Elapsed Time: 0.71 seconds)"
&amp;nbsp; }
 ]
}&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;/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;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;/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;I had a lot of trouble publishing this GP service because the Python script creates a .vbs, and these types of scripts can't be copied to the server. I got around this by changing the ".vbs" reference to ".txt" and publishing. I changed it back to ".vbs" on the server. I'm not sure if the server is blocking the .vbs or what. There are no errors in the server logs.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684461#M26101</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-12T04:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684462#M26102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd, I marked this as Assumed Answered since I did not see a question above.&amp;nbsp; It looks like you have a workaround or were you looking for some more alternatives?&amp;nbsp; IF so, you can unmark the Assumed, and add you question....or change it to a discussion instead of a question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 17:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684462#M26102</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2017-01-30T17:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684463#M26103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, the question is, why is the last part of my tool not running? The results say it is, but the .vbs script is not being created and the chart is not being generated. This script tool runs to completion in IDLE on the ArcGIS server machine, but not from the REST services page online. The messages say "succeeded" after I run execute task (GET), but it only gets to the step where the .csv is created. It seems like the server is blocking the .vbs from running, but I'm not sure. I've been talking to tech support about this, but I haven't gotten an answer yet. We're thinking it may be a permissions issue, ie the user online doesn't have permission to run a script on our local server machine.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 18:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684463#M26103</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-30T18:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684464#M26104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;The "Completed script ChartTest" is printed after the .vbs script is run? &amp;nbsp;Are you running Idle as the same user running the ArcGIS Server Windows service? &amp;nbsp;I'd suggest you take a look at the Event Viewer to see if there are any errors there. &amp;nbsp;Also, you can run ProcMon and set a filter for .vbs script to see if it's actually called on. &amp;nbsp;I don't think it's a permission issue, as the .vbs script resides in the arcgisinput folder, which the ArcGIS Server account would have full access to. &amp;nbsp;The online user doesn't need permission to that folder; the user needs permission to the service and the user running the service needs permissions to whatever is being processed within the service&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;so running Idle as the same user that runs the ArcGIS Server Windows service may be a good test. &amp;nbsp;Make sure you're not running Idle as an admin when you run the script, as I doubt the GP service&amp;nbsp;would run with elevated permission.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 18:59:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684464#M26104</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-01-30T18:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684465#M26105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd, I removed the assumed....so treat as a question again.&amp;nbsp; btw, how you do that is to mark one as correct and then unmark it right away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 20:44:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684465#M26105</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2017-01-30T20:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684466#M26106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The .vbs doesn't reside in the arcgis server folder, it's written on the fly by the Python script and run. I have been running the IDLE from an admin account on the ArcGIS server machine. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 21:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684466#M26106</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-30T21:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684467#M26107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I see. &amp;nbsp;Does the .vbs file get created in the scratch directory? &amp;nbsp;How are you constructing the path to the output .vbs file within the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 21:13:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684467#M26107</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-01-30T21:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684468#M26108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When the Python script tool is run it follows these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Extract values from raster based on input lat/lon coordinates&lt;/P&gt;&lt;P&gt;2. Write these values to .csv&lt;/P&gt;&lt;P&gt;3. Write .vbs to create chart of values in Excel&lt;/P&gt;&lt;P&gt;4. Run .vbs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the .csv and .vbs are written to the C:\temp drive of the server machine. These files will be overwritten everytime the tool is run. When I run the script in IDLE, everything works. When I enter the parameters into the execute task form on the GP service page, it gets to step 2, and writes the .csv to the temp drive. It doesn't get past step 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the .vbs and .csv are created dynamically in Python modules like so:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;vbs_filepath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:\\temp\\Build_raster_Charts.vbs"&lt;/SPAN&gt;

csv_filepath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:\\temp\\ + "&lt;/SPAN&gt;chart_data_for_"\
&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; location_label &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".csv"&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684468#M26108</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-12T04:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684469#M26109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that the syntax within the unpublished script, or the published one? &amp;nbsp;What happens if you&amp;nbsp;construct the path using the os.path.join function and the scratch folder environment variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbs_filepath = os.path.join(arcpy.env.scratchFolder,"Build_raster_Charts.vbs")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;csv_filepath = os.path.join(arcpy.env.scratchFolder,"{0}.csv".format(local_label)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By doing this, you use the scratch workspace of the Server when running the GP service, (the arcgisjobs directory), to maintain unique job folders for each run of the tool that are cleaned up automatically by the software. &amp;nbsp;Typically, the published script will be updated to use this directory during the publishing process. &amp;nbsp;Also, using os.path.join avoids potential path problems when publishing GP services.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 21:31:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684469#M26109</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-01-30T21:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684470#M26110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. So would I define the scratch folder like so?&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&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="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:\arcgisserver\directories\arcgisjobs"&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There was not a scratch folder defined when I published the service&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2017 21:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684470#M26110</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-30T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684471#M26111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The scratch folder is set automatically by the software in both ArcMap and ArcGIS Server. &amp;nbsp;In ArcMap it'd be set to C:\Users\&amp;lt;your_username&amp;gt;\Documents\ArcGIS\scratch by default, and on the Server it'll be set to C:\arcgisserver\directories\arcgisjobs\&amp;lt;service_name&amp;gt;\&amp;lt;unique_jobID&amp;gt;\scratch. &amp;nbsp;It will create this folder whenever the service is run and put any intermediate or output data there. &amp;nbsp;You don't need to overwrite it within your script, just use arcpy.env.scratchFolder to call on it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;vbs_filepath &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;"Build_raster_Charts.vbs"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.scratchWorkspace is the &amp;lt;unique_jobID&amp;gt; folder and arcpy.env.scratchGDB is the &amp;lt;unique_jobID&amp;gt;\scratch.gdb file geodatabase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may not specifically address the problem you're running into, but it's a best practice and can help to make sure that things are written to the jobs directory correctly. &amp;nbsp;What you can also do is add a few more&amp;nbsp;arcpy.AddMessage print statements so you get a better indication of how far along the script has progressed, for example:&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;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Creating .vbs file."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&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;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Created .vbs file."&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684471#M26111</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2021-12-12T04:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684472#M26112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I set the workspace and added a print statement, but the execute task page just returned the same results as above. Still no chart or .vbs script created.&amp;nbsp;&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;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scratchWorkspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:\arcgisserver\directories\arcgisjobs\scratch"&lt;/SPAN&gt;


&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
&amp;nbsp;&amp;nbsp; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;system&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;raster_vbs_script_filepath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Failed to create .vbs file."&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684472#M26112</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-12T04:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684473#M26113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The arcpy.env.scratchFolder environment variable is set for you when you run the GP service. &amp;nbsp;There's no need to set it to anything within your script. &amp;nbsp;Simply construct the path to your output data using the arcpy.env.scratchFolder environment variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;vbs_filepath &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;scratchFolder&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"Build_raster_Charts.vbs"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see your "Failed to create .vbs file" message? &amp;nbsp;Is there anything in the server logs? &amp;nbsp;Try to set the logs to DEBUG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 01:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684473#M26113</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-01-31T01:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684474#M26114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We did some digging last night and discovered that the script is stopping before it even opens Excel, after the csv is created. So it wasn't even getting to the vbs script. It stops at this line in the Python script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;Excel &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Workbooks&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;spreadsheet_template_filepath&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried setting all the Excel files and vbs script to output paths to os.path.join(arcpy.env.scratchFolder,"file.xlsm") It DID work in&amp;nbsp;IDLE when these paths are joined to the scratchFolder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also&amp;nbsp;changed the paths for the&lt;SPAN&gt;&amp;nbsp;Excel spreadsheet and vbs script to our&amp;nbsp;wwwroot folder that's accessible from our web server. And I moved the Excel and vbs files to&amp;nbsp;"C:\arcgisserver\directories\arcgissystem\arcgisinput\Excel_Files" .This didn't work either.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The crazy thing is, there is nothing in the server logs. No errors, or any messages at all. And no matter what we do, the execute task page returns the same message that the script ran successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found &lt;A href="http://serverfault.com/questions/230219/vbscript-wont-run-for-domain-user-on-windows-server-2008-r2"&gt;this&lt;/A&gt;&amp;nbsp;thread, and I'm wondering if we need to add the Windows Script Host to the application pool on the IIS server?&lt;/P&gt;&lt;P&gt;When I open the registry editor, there is no "enable" key under the Windows Script Host settings.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 14:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684474#M26114</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-31T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684475#M26115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the Excel file isn't generated, then we should focus on that first before looking into running the .vbs script. &amp;nbsp;What version are you using? &amp;nbsp;If you're creating an .xls file, what if you use &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/conversion-toolbox/an-overview-of-the-excel-toolset.htm"&gt;arcpy&lt;/A&gt;&amp;nbsp;instead? &amp;nbsp;I'm not sure if you use your other module due to a formatting thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the spreadsheet_template_filepath variable set to? &amp;nbsp;I imagine the GP service would fail if Server couldn't access the file. &amp;nbsp;Can you add a message for the Excel variable and see what it returns, (arcpy.AddMessage(Excel). &amp;nbsp;It may not be the actual data but at least you can verify if it's opening the template Excel file or not. &amp;nbsp;I wouldn't move anything within wwwroot, because then you introduce latency going through your web server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 19:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684475#M26115</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-01-31T19:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684476#M26116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're using Excel 2016 on the server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The spreadsheet template variable is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;vbs_filepath &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;"Build_"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; custom_suffix &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Charts.vbs"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It writes successfully to the server scratch folder when I run it in IDLE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the module that creates the spreadsheet from the csv. It uses a static Excel template "CFS_Monthly_chart_template.xlsm", which I've placed in the scratch folder. I put in print statements to confirm the location of the scratch folder. It's: "C:\arcgisserver\directories\arcgissystem\arcgisinput\Chart_Test.GPServer\extracted\v101\website_test\scratch"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We created a log file output in the Python script to try to find out where the error is. It prints to line #22 here and then prints the error message at line #65, so we verified that it's not even opening Excel from the Server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;build_spreadsheet_for_charts&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;location_data_dict&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;chart_folder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;custom_suffix&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;daily_analysis_tablename&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;data_source&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;##chart_test_path = "C:\\Chart_Test"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; chart_test_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r_chart_path

&amp;nbsp;&amp;nbsp;&amp;nbsp; foldername &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; chart_folder

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;##r_spreadsheet_filepath = chart_test_path + "\\" + "CFS_Charts.xlsm"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; r_spreadsheet_filepath &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;"CFS_Charts.xlsm"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;##r_spreadsheet_filepath = excel_files_path + "\\" + "CFS_Charts.xlsm"&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;##spreadsheet_template_filepath = chart_test_path + "\\" + "CFS_Monthly_chart_template.xlsm"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;##spreadsheet_template_filepath = "C:\\Chart_Test\\CFS_Monthly_chart_template.xlsm"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; spreadsheet_template_filepath &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;"CFS_Monthly_chart_template.xlsm"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; None
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; win32com&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;client&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Dispatch&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Excel.Application"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&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; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output_log_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Getting ready to open excel spreadsheeet template \n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Workbooks&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;spreadsheet_template_filepath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output_log_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Successfully opened excel spreadsheeet template \n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; location_label &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&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; starting_row &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; starting_row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;## index for location_data_dict starts at 1 not 0 (dictionary uses input index not standard index for a list)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; location_index &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&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;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;location_data_dict&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; location_data_tuple &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; location_data_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;location_index&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; country&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lat_str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lon_str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; wmo_str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; elev_m_str &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; location_data_tuple
&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; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; location_index &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;## location index = 1&amp;nbsp; --&amp;gt; row = 5; location index = 2 --&amp;gt; row = 6 (not 7)&lt;/SPAN&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; row &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; starting_row &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;location_index &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&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; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"A"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; wmo_str
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"B"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; lat_str
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; lon_str
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"D"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; name&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"E"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; country
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"F"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; elev_m_str
&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; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"J2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foldername
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Excel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Worksheets&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Available_Stations"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"L2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Formula &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; data_source

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;## End of Location For Loop&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; r_spreadsheet_filepath
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r_spreadsheet_filepath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;remove&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r_spreadsheet_filepath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&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; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ActiveWorkbook&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SaveAs&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r_spreadsheet_filepath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ActiveWorkbook&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Close
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xlApp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Quit&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; xlApp
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output_log_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Error updating CFS Charts spreadsheet from template\n"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output_log_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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Error updating CFS Charts spreadsheet from template"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; xlApp
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;exit&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&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;/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;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;/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;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;/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;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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684476#M26116</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-12T04:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684477#M26117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You&amp;nbsp;should print the traceback error, as there's no way to know why it failed if it's in your try: except block. &amp;nbsp;Can you update line 65 to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;print&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"Error updating CFS Charts spreadsheet from template\n{0}".format(traceback.format_exc())
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can parse out the traceback error however you like, but it's important to return it. &amp;nbsp;In this case, it may be best to remove the try: except block so you can return all of the messages within the GP service framework. &amp;nbsp;Be sure to import the traceback module at the beginning of your script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684477#M26117</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2021-12-12T04:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684478#M26118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added this line, but I didn't get an error message. Yesterday I added our ArcGIS server user login to the DCOM registry for Excel, and to the Desktop folder permissions under the Windows system folders (32 and 64 bit). Now when I click execute task on the REST page, a log file is generated on the server. It claims that that whole process is completing. This is new. However, nothing is generated in the scratch folder on the server. It still runs perfectly in IDLE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the log file output. It never got past line 3 here before. This log file is identical, whether I &amp;nbsp;run the script from IDLE or from the REST page. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. starting to create csv data file&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;2. starting to build the spreadsheet&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;3. Getting ready to open excel spreadsheeet template &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;4. Successfully opened excel spreadsheeet template &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;5. starting to build vbs script&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;6. starting to execute vbs script&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;7. return value: 0 commandline_output:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if I have my scratch workspace set correctly? It's&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;arcpy.env.scratchWorkspace = "C:\arcgisserver\directories\arcgisjobs"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scratch folder is under the arcgissystem\arcgisinputs folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also wondering about the data store on the server. I shouldn't have to register the scratch folder should I?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684478#M26118</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-02-01T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684479#M26119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh, sorry, Lloyd, I meant to update it to arcpy.AddMessage(&amp;lt;message&amp;gt;). &amp;nbsp;You'll never see print statements when running a GP tool or GP service. &amp;nbsp;If you still have your try: except block, remote that and let errors come back directly through the GP service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to set any scratch workspaces, folders or geodatabases. &amp;nbsp;The default path for them is correct. &amp;nbsp;For ease of use, simply use the default of arcpy.env.scratchFolder to construct the path to output data that exists in folders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scratch folder doesn't need to be registered on the Server, as it knows it can write to the directory already, (providing it's left at the default location). &amp;nbsp;I wouldn't think that the raster data location is a problem, as it would fail earlier in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684479#M26119</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-02-01T16:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service Runs But Doesn't Produce Output</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684480#M26120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I moved all of my data back to the server folders they were originally extracted to when I published the GP service. I had commented out all the g_ESRI_variables and put everything in local folders to test it in IDLE. I reinstated these paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to run the script in IDLE now, I get this, &lt;/SPAN&gt;&lt;STRONG&gt;"Error finding C:\Users\ADMINI~1.MET\AppData\Local\Temp\2"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I added this at the start of the script to see what was going on:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;scratch_folder &lt;SPAN class="operator 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="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;scratch_folder&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;exit&lt;SPAN class="punctuation token"&gt;(&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;If I don't define the scratch workspace, it prints this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\Users\ADMINI~1.MET\AppData\Local\Temp\2\scratch&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I set the workspace to&amp;nbsp;arcpy.env.scratchWorkspace = "C:\arcgisserver\directories\arcgisjobs", it prints this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\arcgisserver\directories\arcgissystem\arcgisinput\Chart_Test.GPServer\extracted\v101\website_test\scratch&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I first published the tool, it was set to&amp;nbsp;g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,u'temp'). When I set it back to this, it also prints:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\Users\ADMINI~1.MET\AppData\Local\Temp\2\scratch&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm confused. There seem to be two scratch folders,&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Scratch Workspace&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; C&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; rcgisserver\directories rcgisjobs\scratch
Scratch Folder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; C&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;\arcgisserver\directories\arcgissystem\arcgisinput\Chart_Test&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPServer\extracted\v101\website_test\scratch
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-runs-but-doesn-t-produce/m-p/684480#M26120</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-12T04:47:18Z</dc:date>
    </item>
  </channel>
</rss>

