I use ArcGIS 10.3
I have two layers : Project\project.DBO.Qo and Project\project.DBO.Poly. I want to select Project\project.DBO.Qo objects.
I got this error in Python Console:
<SPAN class="keyword token">print</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Describe<SPAN class="punctuation token">(</SPAN>r<SPAN class="string token">"Project\project.DBO.Qo"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>shapeType
Point
<SPAN class="keyword token">print</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Describe<SPAN class="punctuation token">(</SPAN>r<SPAN class="string token">"Project\project.DBO.Poly"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN>shapeType
Polygon
arcpy<SPAN class="punctuation token">.</SPAN>SelectLayerByLocation_management<SPAN class="punctuation token">(</SPAN>r<SPAN class="string token">"Project\project.DBO.Qo"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"WITHIN"</SPAN><SPAN class="punctuation token">,</SPAN> r<SPAN class="string token">"Project\project.DBO.Poly"</SPAN><SPAN class="punctuation token">)</SPAN>
Runtime error Traceback <SPAN class="punctuation token">(</SPAN>most recent call last<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
File <SPAN class="string token">"<string>"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> <SPAN class="operator token"><</SPAN>module<SPAN class="operator token">></SPAN> File <SPAN class="string token">"C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py"</SPAN><SPAN class="punctuation token">,</SPAN> line <SPAN class="number token">7279</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">in</SPAN> SelectLayerByLocation <SPAN class="keyword token">raise</SPAN> e ExecuteError<SPAN class="punctuation token">:</SPAN> Failed to execute<SPAN class="punctuation token">.</SPAN> Parameters are <SPAN class="operator token">not</SPAN> valid<SPAN class="punctuation token">.</SPAN> ERROR <SPAN class="number token">000840</SPAN><SPAN class="punctuation token">:</SPAN> The value <SPAN class="keyword token">is</SPAN> <SPAN class="operator token">not</SPAN> a Boolean<SPAN class="punctuation token">.</SPAN> Failed to execute <SPAN class="punctuation token">(</SPAN>SelectLayerByLocation<SPAN class="punctuation token">)</SPAN><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>
But Select By Location... in graphical user interface of ArcGIS works fine with the same layers.