I've got a problem with the following script:
<SPAN class="keyword token">import</SPAN> arcpy<SPAN class="punctuation token">,</SPAN> os
infile <SPAN class="operator token">=</SPAN> r<SPAN class="string token">"C:\temp4\ALK_Merge.shp"</SPAN>
infileL <SPAN class="operator token">=</SPAN> <SPAN class="string token">"infile_Layer"</SPAN>
count <SPAN class="operator token">=</SPAN> int<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>GetCount_management<SPAN class="punctuation token">(</SPAN>infile<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>getOutput<SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
x <SPAN class="operator token">=</SPAN> <SPAN class="number token">99</SPAN>
xC <SPAN class="operator token">=</SPAN> count<SPAN class="operator token">/</SPAN>x
xC1 <SPAN class="operator token">=</SPAN> xC <SPAN class="operator token">+</SPAN> <SPAN class="number token">2</SPAN>
<SPAN class="keyword token">for</SPAN> i <SPAN class="keyword token">in</SPAN> range<SPAN class="punctuation token">(</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> xC1<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN> i
sPath <SPAN class="operator token">=</SPAN> infile<SPAN class="punctuation token">.</SPAN>split<SPAN class="punctuation token">(</SPAN><SPAN class="string token">".shp"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> sPath
xRange <SPAN class="operator token">=</SPAN> i <SPAN class="operator token">*</SPAN> <SPAN class="number token">99</SPAN>
xRange1 <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>i<SPAN class="operator token">*</SPAN><SPAN class="number token">99</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="number token">99</SPAN>
<SPAN class="keyword token">print</SPAN> xRange
<SPAN class="keyword token">print</SPAN> xRange1
outFeature <SPAN class="operator token">=</SPAN> sPath <SPAN class="operator token">+</SPAN> <SPAN class="string token">"_"</SPAN> <SPAN class="operator token">+</SPAN> i <SPAN class="operator token">+</SPAN> <SPAN class="string token">".shp"</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>MakeFeatureLayer_management <SPAN class="punctuation token">(</SPAN>infile<SPAN class="punctuation token">,</SPAN> infileL<SPAN class="punctuation token">)</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>SelectLayerByAttribute_management <SPAN class="punctuation token">(</SPAN>infileL<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"NEW_SELECTION"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"\"FID\" <= "</SPAN> <SPAN class="operator token">+</SPAN> xRange <SPAN class="operator token">+</SPAN> <SPAN class="string token">"AND"</SPAN> <SPAN class="operator token">+</SPAN> <SPAN class="string token">"\"FID\" >= "</SPAN><SPAN class="operator token">+</SPAN> xRange1 <SPAN class="operator token">+</SPAN> <SPAN class="string token">""</SPAN><SPAN class="punctuation token">)</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>CopyFeatures_management<SPAN class="punctuation token">(</SPAN>infileL<SPAN class="punctuation token">,</SPAN> outFeature<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The problem is in line 25:
outFeature = sPath + "_" + i + ".shp"
TypeError: can only concatenate list (not "str") to list
Any ideas how to solve this?