<?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 010328: Syntax error at or near symbol ). in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315399#M24540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not very familiar with map algebra, but it seems like you might need something like a comma in between your input files and the (&amp;lt;3, &amp;gt;=30 etc...) condition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;H:\Internship_Tom_Waddington\old_code\data\rel_rast =
 con((H:\Internship_Tom_Waddington\old_code\data\curv_plan_1&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;lt; 3) and
 (H:\Internship_Tom_Waddington\old_code\data\slope&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;gt;= 30) and
 (H:\Internship_Tom_Waddington\old_code\data\slope&lt;STRONG&gt;,&lt;/STRONG&gt;&amp;lt;= 60) and
 (H:\Internship_Tom_Waddington\old_code\data\dem_resample&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;gt; 900), 1, 0)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:00:32 GMT</pubDate>
    <dc:creator>LornaMurison</dc:creator>
    <dc:date>2021-12-11T15:00:32Z</dc:date>
    <item>
      <title>ERROR 010328: Syntax error at or near symbol ).</title>
      <link>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315398#M24539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi im pretty new to python but im developing a code to identify automatic release zones for avalanches. i have the code working every time when i use the specific directory but when changing it to a generic directory so it can be used with different data sets with minimal changes other than changing the workspace i keep getting syntax errors ive managed to get the code working up to this point (shown below) but cant work out why it keeps presenting me with the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Release raster...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;curv_plan_1 = workspace + "\\curv_plan_1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;slope = workspace + "\\slope"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dem_resample = workspace + "\\dem_resample"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;InExpression1 = workspace + "\\rel_rast" + " = con((" + curv_plan_1 + " &amp;lt; 3) and (" + slope + " &amp;gt;= 30) and (" + slope + "&amp;lt;= 60) and (" + dem_resample + " &amp;gt; 900), 1, 0) "&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print InExpression1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MultiOutputMapAlgebra_sa(InExpression1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the print and error output that it comes with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;H:\Internship_Tom_Waddington\old_code\data\rel_rast = con((H:\Internship_Tom_Waddington\old_code\data\curv_plan_1 &amp;lt; 3) and (H:\Internship_Tom_Waddington\old_code\data\slope &amp;gt;= 30) and (H:\Internship_Tom_Waddington\old_code\data\slope&amp;lt;= 60) and (H:\Internship_Tom_Waddington\old_code\data\dem_resample &amp;gt; 900), 1, 0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "H:\Internship_Tom_Waddington\old_code\codes\path_my_old_25a.py", line 79, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MultiOutputMapAlgebra_sa(InExpression1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 010328: Syntax error at or near symbol ).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 010267: Syntax error in parsing grid expression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (MultiOutputMapAlgebra).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2011 15:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315398#M24539</guid>
      <dc:creator>tomwaddington</dc:creator>
      <dc:date>2011-11-01T15:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 010328: Syntax error at or near symbol ).</title>
      <link>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315399#M24540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not very familiar with map algebra, but it seems like you might need something like a comma in between your input files and the (&amp;lt;3, &amp;gt;=30 etc...) condition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;H:\Internship_Tom_Waddington\old_code\data\rel_rast =
 con((H:\Internship_Tom_Waddington\old_code\data\curv_plan_1&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;lt; 3) and
 (H:\Internship_Tom_Waddington\old_code\data\slope&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;gt;= 30) and
 (H:\Internship_Tom_Waddington\old_code\data\slope&lt;STRONG&gt;,&lt;/STRONG&gt;&amp;lt;= 60) and
 (H:\Internship_Tom_Waddington\old_code\data\dem_resample&lt;STRONG&gt;,&lt;/STRONG&gt; &amp;gt; 900), 1, 0)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:00:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315399#M24540</guid>
      <dc:creator>LornaMurison</dc:creator>
      <dc:date>2021-12-11T15:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 010328: Syntax error at or near symbol ).</title>
      <link>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315400#M24541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried what you suggested and now i get this error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;('H:\\Internship_Tom_Waddington\\old_code\\data\\rel_rast = con((H:\\Internship_Tom_Waddington\\old_code\\data\\curv_plan_1', ' &amp;lt; 3) and (H:\\Internship_Tom_Waddington\\old_code\\data\\slope', ' &amp;gt;= 30) and (H:\\Internship_Tom_Waddington\\old_code\\data\\slope', '&amp;lt;= 60) and (H:\\Internship_Tom_Waddington\\old_code\\data\\dem_resample', ' &amp;gt; 900), 1, 0) ')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "H:\Internship_Tom_Waddington\old_code\codes\path_my_old_25a.py", line 79, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.MultiOutputMapAlgebra_sa(InExpression1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: Object: Error in executing tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2011 07:31:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315400#M24541</guid>
      <dc:creator>tomwaddington</dc:creator>
      <dc:date>2011-11-02T07:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 010328: Syntax error at or near symbol ).</title>
      <link>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315401#M24542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've found that with things like the raster calculator, Arc is VERY finicky about syntax.&amp;nbsp; Things like not having spaces in between each argument can throw it off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would play around with it in the raster calculator until you can get it to work and then try again in python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2011 12:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-010328-syntax-error-at-or-near-symbol/m-p/315401#M24542</guid>
      <dc:creator>LornaMurison</dc:creator>
      <dc:date>2011-11-02T12:01:12Z</dc:date>
    </item>
  </channel>
</rss>

