Select to view content in your preferred language

ERROR 100014 Summarize Within failed

4851
14
03-08-2023 10:12 AM
MarkBinder
Occasional Contributor

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?

14 Replies
RyanColeman
Occasional Contributor

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

josethomazini_imagem
New Contributor

Hey, Mark.

I was facing the same issue.
Now I think I´ve found the solution, so follows my suggestion.

 

This is the example they´ve provided in the documentation:

 

 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' 

 

 

What the documentation never tells you is that the out_feature_class won´t be saved in the workspace. The function generates the output in the project´s gdb, NOT in your workspace.

 

Look again the output that ArcPRO generated. It is not in the same workspace you are using (you may not realize that if you are not using your own gdb).

 

So, if you set the environment variable to the scratch-workspace the function will be able to join it to the out_featur_class name.

 

Since I want the output to be generated along with the other input features (in the same workspace), I just set the scratch-workspace path the same as the workspace path:

 

arcpy.env.scratchWorkspace = arcpy.env.workspace 

 

 
ArcPRO aways works because it must declare those env variables internally. But if you export the python command from the history tab it won´t provide you the env variables. That´s just not fair with us, poor mortals. 😁

 

Hope it works for you too.
AS_Oxford
New Contributor

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.

0 Kudos
ParkerJohnsonGas
New Contributor II

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.

0 Kudos
AS_Oxford
New Contributor

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?

0 Kudos