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 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.
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 was using 2.7 I think but I have 2.8 now. I haven't tried it yet with the new version.
I've not upgraded because I just fixed my dev environment upgrading to 2.7.3...so I've not quite worked up the appetite to jump to 2.8 yet!
These are the times I wish Esri actually watched these threads.
No fix for the last 3 versions?
🙄
We had the same problem since last week. But we could solve it by setting the coordinate system in the environments tab of the tool.
However we never had to do this before.
@GISAdminGKB That's a rather astute observation!
Well I just tried it and it seems to be working like it should. I think there was a 2.8.1 update a few days ago so maybe that fixed it.