ERROR 160244: Object has no schema locks.Failed to execute (SelectLayerByLocation).
I noticed it's giving me the error on a multipart polygon. I exploded and it worked. Can I not use multipart polygons?
I was using 2.7 I think but I have 2.8 now. I haven't tried it yet with the new version.
As I feared. For my particular workflow i need to retain the multipart polygon and even then I'm not sure there is a way to explode via arcpy.
Out of curiosity, what version of Pro are you using?
Pro 2.7.3 and Python 3.7.9 here...
EDIT:
I just tried the same process in ArcMap 10.7.1 (in Python window) with the same exact data and the tool runs without error.
I never found a solution. I ended up exploding the multipart feature so now I use 4 polygons instead of 1. It's definitely broken because I have tried it with different multi-part features and none of them work.
Could you share sample data that you could use to reproduce the issue?
Not sure how I missed replying to this post.
In case you still have the issue, could you share a sample parcel data along with the multipart feature class?
This behavior is occurring in fGDBs, not eGDBs.
I've got the same thing going on now with a script that was running perfectly fine a few months ago...all I can think of is I've upgraded Pro several times since then. Exact same tool: arcpy.management.SelectLayerByLocation
@Anonymous User Did you ever find a solution for this?
My input feature is a Parcel poly feature class. Selecting feature is a 4 multipart feature class. They are both using the same spatial reference.
Relationship is "Have their center in"
Reboot does nothing. I even tried copying the feature to a different layer.
Could you provide details about the input and select features (Geometry Type, Spatial Reference, which one is multipart feature)?
Where are the features stored (File GDB, Shapefiles, Ent. GDB)
Also provide the defined tool parameters?
Does rebooting the machine work (It has worked mysteriously for many problems. So I don't want to miss this point.)?
possibly https://pro.arcgis.com/en/pro-app/2.7/help/data/geodatabases/overview/modifying-a-spatial-index.htm#GUID-F9859FEE-F5BD-461E-9179-EFBFE9585C79
I ran the repair geometry and that didn't fix the issue. This error has no solutions.
160244: Object has no schema locks.—ArcGIS Pro | Documentation
It should work. Potentially bad geometry - run the repair geometry tool , or a bad spatial index.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.