I have a Python script that goes through several steps including using arcpy.analysis.SummarizeWithin(). When I run the script in the Python window of ArcGIS Pro it works just fine. When I run the script in an IDE like Spyder or Visual Studio Code sometimes I get the ERROR 100014 code; and sometimes it works.
I am completely baffled why sometimes it works sometimes and not others. All of the datasets are the same each time.
Any suggestions?
I'm in the same situation. It works in ArcGIS Pro Geoprocessing but analysis.SummarizeWithin in arcpy no longer works at all. Tried defining the projection, with or without the summary table, in memory and on disk, result is always ERROR 100014: Summarize Within failed. I'm on 3.1.3 worked fine prior to updating
Hey, Mark.
arcpy.analysis.SummarizeWithin('neighborhoods', 'crimes', 'neighborhood_crimes')
The 3 parameteres (in_polygons, in_sum_features and out_feature_class), must be all feature names (not paths).
The function will look for the parent folder path in the workspace env variable, so the documentation says you must declare it first, as:
arcpy.env.workspace = r'path\to\your\workspace'
arcpy.env.scratchWorkspace = arcpy.env.workspace
This is the only suggestion in this thread that worked for me. I would never have thought of that solution - thank you! I just added the line to change the scratch workspace to my gdb's workspace and the tool ran successfully. It's a bit annoying because it creates a scratch.gdb in that folder, which I did not want, so I set the code to delete it and reset the scratch workspace after running the tool. I hope ESRI can fix this and/or add this info to the documentation because this is a really bizarre requirement.
Quite a late response but ( I see that there is no Solution selected so...) I was running into this issue as well, not with any scripting but just within the Pro client.
For me, running 'Make Feature Layer' on my feature classes I was originally using as input and utilizing those Layers in the tool was the only thing that could get it to work. In the tool Documentation the inputs are defined as Feature Layers, but I was using Feature Classes.
Maybe make sure that any scripts are creating Feature Layers that get fed into the Summarize Within tool parameters. Hopefully you aren't experiencing this anymore, but if so I hope this may help.
Thanks for the suggestion but this did not work for me. The only thing that worked was to set the scratch workspace to the actual workspace, as suggested above. After that I could use either layers or feature classes successfully in the code. Maybe your layers were created in the scratch workspace, so that's why this worked for you?