<?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: Unterminated string literal while running GP service in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634653#M42668</link>
    <description>&lt;P&gt;If you look at the error message, it is clear the line 74 in the error message is not the line 74 in the code snippet you posted.&amp;nbsp; Are you showing the code snippet from the Python file on ArcGIS Server or what you ran on Pro?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 17:36:02 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2025-07-21T17:36:02Z</dc:date>
    <item>
      <title>Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634634#M42665</link>
      <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a python script tool that runs successfully in ArcGIS Pro and we have published it to ArcGIS Enterprise successfully as a WebTool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On running the tool from REST endpoint we are getting the error of &lt;STRONG&gt;"Unterminated string literal".&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Attached is the screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error_GP_1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136850iA1FA0D310889C621/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error_GP_1.png" alt="Error_GP_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Attaching snippet of script for reference.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snippet_Script.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136851iCE7E515C3F41239E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snippet_Script.png" alt="Snippet_Script.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any inputs on this would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 16:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634634#M42665</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2025-07-21T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634653#M42668</link>
      <description>&lt;P&gt;If you look at the error message, it is clear the line 74 in the error message is not the line 74 in the code snippet you posted.&amp;nbsp; Are you showing the code snippet from the Python file on ArcGIS Server or what you ran on Pro?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 17:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634653#M42668</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-07-21T17:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634850#M42674</link>
      <description>&lt;P&gt;The publish process change the script. You can find the published script under&amp;nbsp;C:\arcgisserver\directories\arcgissystem\arcgisinput (after the changes)&lt;/P&gt;&lt;P&gt;Sometime the publishing process add some single quote somewhere (I have no idea why).&lt;/P&gt;&lt;P&gt;It is not supported to change the published script directly but if you go there, find the extra quote and delete it you should get it up and running.&lt;/P&gt;&lt;P&gt;Have fun&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 05:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634850#M42674</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2025-07-22T05:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634857#M42675</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;the code snippet is from Python file on Pro&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 06:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634857#M42675</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2025-07-22T06:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634858#M42676</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1389"&gt;@ModyBuchbinder&lt;/a&gt;&amp;nbsp;If i go to the path mentioned in the screenshot I don't see the python just a toolbox&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 06:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634858#M42676</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2025-07-22T06:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634905#M42680</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1389"&gt;@ModyBuchbinder&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As suggested, in ArcGIS Pro (ArcGIS Server &amp;amp; Pro are on the same machine) I went to the path mentioned in the screenshot and was able to add the toolbox in the catalog window.&lt;/P&gt;&lt;P&gt;I expanded the toolbox &amp;gt; right clicked on the script too &amp;gt; Edit and was able to remove the extra quotes however, now am getting the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error_GP_new.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/136895i6BD970C41857651D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error_GP_new.png" alt="Error_GP_new.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 11:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634905#M42680</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2025-07-22T11:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634959#M42682</link>
      <description>&lt;P&gt;The call to Append is pretty straightforward, nothing obvious like a missing comma.&amp;nbsp; Two ideas come to mind:&amp;nbsp; 1) the field_map object is somehow messed up and not being processed correctly, and 2) maybe it doesn't like the 2 optional arguments by position, so you could try them as named arguments.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 14:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1634959#M42682</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-07-22T14:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unterminated string literal while running GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1635286#M42687</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;You used python toolbox where the python code is embedded into the toolbox.&lt;/P&gt;&lt;P&gt;I use simple toolbox where the tool is pointing (by reference) to the script (py separate file).&lt;/P&gt;&lt;P&gt;Then when you publish you get the same structure where you have a py file with the script.&lt;/P&gt;&lt;P&gt;It is easier to handle and you can use IDLE like pycharm that really help you get your code right.&lt;/P&gt;&lt;P&gt;Move to simple&amp;nbsp; py file mean only to copy the execute function into a different file and define new toolbox.&lt;/P&gt;&lt;P&gt;You might deleted something by mistake while editing the toolbox.&lt;/P&gt;&lt;P&gt;Sometime when there is a strange error the problem is really in one of the previous lines.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 05:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/unterminated-string-literal-while-running-gp/m-p/1635286#M42687</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2025-07-23T05:01:04Z</dc:date>
    </item>
  </channel>
</rss>

