I have a Python script that has been crashing ever since I had to update to Windows 10 but always worked prior. Not sure if that is the reason or just a coincidence. I have isolated the problem to the part where I try some basic map algebra on rasters. The code below is what I have been trying in the Python window and ArcMap crashes every time with no error. It seems to be related to accessing the individual band because the code works on the main raster. Also, if I add the Band into ArcMap manually and run the code using the layer it also works. I have tried various ways of representing the path to Band 4 but no luck.
<SPAN class="keyword token">from</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>sa <SPAN class="keyword token">import</SPAN> <SPAN class="operator token">*</SPAN>
Rast <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\Projects\m_3409443_ne_15_1_20150808.tif'</SPAN>
Band4 <SPAN class="operator token">=</SPAN> Rast <SPAN class="operator token">+</SPAN> r<SPAN class="string token">'\Band_4'</SPAN>
calc <SPAN class="operator token">=</SPAN> Raster<SPAN class="punctuation token">(</SPAN>Band4<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token"><</SPAN> <SPAN class="number token">60</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>