<?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: ArcPy Raster Function error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322104#M25081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like the error is being thrown not in your script but in the arcpy lib.&lt;/P&gt;&lt;P&gt;This could be due to the way in which you are calling the arcpy function.&lt;/P&gt;&lt;P&gt;Could you please post your entire code so that we can do some more in depth debugging?&lt;/P&gt;&lt;P&gt;The full error text would also help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Dec 2019 22:06:43 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-12-18T22:06:43Z</dc:date>
    <item>
      <title>ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322103#M25080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to read in a raster function to read a multi-band time series raster:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filein = os.path.join(os.getcwd(),r"raster_calcs\Russian-Raster-Drought\data\baseflow_day_HadGEM2-ES_rcp85_2018-2046_drought.tif")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myRaster = arcpy.Raster(filein)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I receive a TypeError:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;TypeError&lt;/SPAN&gt;                                 Traceback (most recent call last)&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;&amp;lt;ipython-input-28-b2a611fe1e8d&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;      1&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;#create raster object from file&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;----&amp;gt; 2&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt; &lt;/SPAN&gt;myRaster &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;Raster&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;filein&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Raster.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;__new__&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(cls, in_raster, is_multidimensional)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;     71&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;     72&lt;/SPAN&gt;   &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;def&lt;/SPAN&gt; __new__&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;cls&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; in_raster&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; is_multidimensional&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;False&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;---&amp;gt; 73&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;     &lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; super&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;__new__&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;cls&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; in_raster&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; is_multidimensional&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;     74&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;     75&lt;/SPAN&gt;   &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;def&lt;/SPAN&gt; getVariableAttributes&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; variable_name&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;TypeError&lt;/SPAN&gt;: expected 1 arguments, got 2&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see two arguments here. What am I missing?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2019 20:11:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322103#M25080</guid>
      <dc:creator>JasonCarter1</dc:creator>
      <dc:date>2019-12-18T20:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322104#M25081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like the error is being thrown not in your script but in the arcpy lib.&lt;/P&gt;&lt;P&gt;This could be due to the way in which you are calling the arcpy function.&lt;/P&gt;&lt;P&gt;Could you please post your entire code so that we can do some more in depth debugging?&lt;/P&gt;&lt;P&gt;The full error text would also help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2019 22:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322104#M25081</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-12-18T22:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322105#M25082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. Here is the the code and error. I just got started with the project and hit this error right away.&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;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; numpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

&lt;SPAN class="comment token"&gt;#input raster&lt;/SPAN&gt;
filein &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;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getcwd&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;r&lt;SPAN class="string token"&gt;"raster_calcs\Russian-Raster-Drought\data\baseflow_day_HadGEM2-ES_rcp85_2018-2046_drought.tif"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#out raster&lt;/SPAN&gt;
fileout &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;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getcwd&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;r&lt;SPAN class="string token"&gt;'raster_calcs\output\output.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#create raster object from file&lt;/SPAN&gt;
myRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Raster&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;filein&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

TypeError                                 Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;ipython&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;input&lt;SPAN class="number token"&gt;-28&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;b2a611fe1e8d&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#create raster object from file&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; myRaster &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Raster&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;filein&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

C&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Raster&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;py &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; __new__&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cls&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_raster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; is_multidimensional&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;71&lt;/SPAN&gt; 
     &lt;SPAN class="number token"&gt;72&lt;/SPAN&gt;   &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__new__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cls&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_raster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; is_multidimensional&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;73&lt;/SPAN&gt;     &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; super&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;__new__&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;cls&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; in_raster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; is_multidimensional&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;74&lt;/SPAN&gt; 
     &lt;SPAN class="number token"&gt;75&lt;/SPAN&gt;   &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getVariableAttributes&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; variable_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;

TypeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; expected &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; arguments&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; got &lt;SPAN class="number token"&gt;2&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322105#M25082</guid>
      <dc:creator>JasonCarter1</dc:creator>
      <dc:date>2021-12-11T15:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322106#M25083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;Which IDE do you use?&lt;/P&gt;&lt;P&gt;PyCharm has a very nice debugging suite.&lt;/P&gt;&lt;P&gt;if you can put in a break at line 7 and look at what "filein" actually is, then step through the rest of the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At a guess i would say that the os.path.join is not combining the inputs correctly.&lt;/P&gt;&lt;P&gt;Try using the complete path instead of using&amp;nbsp;&lt;SPAN&gt;os.path.join(&lt;SPAN style="background-color: #ffffff;"&gt;os.getcwd(),....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;so filein = r"C:/whereyourrastais"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;It looks like the&amp;nbsp;os.getcwd is causing you issues when combined with os.path.join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2019 21:37:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322106#M25083</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-12-19T21:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322107#M25084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Jupyter Notebook for this project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion. The os.path.join(os.getcwd(),... produced the correct path after I printed it. I tired using the path directly too, but received the same error.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 16:05:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322107#M25084</guid>
      <dc:creator>JasonCarter1</dc:creator>
      <dc:date>2019-12-20T16:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322108#M25085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having the same issue. Basically all of my Raster(some_path_to_raster) functions are returning this error "TypeError: expected 1 arguments, got 2". I've used arcpy.Exists(&lt;SPAN&gt;some_path_to_raster) to make sure the raster is their and it is. If I try my calculation without the Raster(), just use the path I get a "can't multiply by string error". I have spatial analyst checked out. This was working yesterday.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Con_Con_img11_temp = Con(in_conditional_raster=Con_img1, &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;in_true_raster_or_constant=max_chm, &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;in_false_raster_or_constant=Con_img1, &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;where_clause="Value &amp;gt; 254")&lt;/P&gt;&lt;P&gt;Con_Con_img11_temp.save(Con_Con_img11)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if arcpy.Exists(mask_raster):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;print("mask_raster exists")&lt;BR /&gt; if arcpy.Exists(Con_Con_img11):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;print("Con_Con_img11 exists")&lt;/P&gt;&lt;P&gt;try :&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;targetCHMFinal_grid = Raster(mask_raster) * Raster(Con_Con_img11)&lt;BR /&gt; except TypeError:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;print("version 1 failed")&lt;BR /&gt; try:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;targetCHMFinal_grid = mask_raster * Raster(Con_Con_img11)&lt;BR /&gt; except TypeError:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;print("version 2 failed")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2020 21:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322108#M25085</guid>
      <dc:creator>KenPierce</dc:creator>
      <dc:date>2020-02-17T21:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPy Raster Function error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322109#M25086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use arcpy.Raster?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2020 21:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-raster-function-error/m-p/322109#M25086</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-02-17T21:55:46Z</dc:date>
    </item>
  </channel>
</rss>

