AnsweredAssumed Answered

Error 000800 in Summary Statistics in script tool

Question asked by vshah6 on Apr 11, 2018
Latest reply on Apr 11, 2018 by vshah6

Edit at the bottom.

 

So I am creating a script tool to be able to provide reports on a weekly basis without having to enter in the parameters over and over again where as I can just click a button to run it for me in the form of a script tool.

 

Here's what my script looks like:

import arcpy
import os
import arcpy.mapping as map
from arcpy import env
import datetime

mxd = arcpy.mapping.MapDocument("Current")
slackFeatures = r'Slack Features'
date = datetime.date.today()
reportsGDB = r'\\Desktop\Summary_Report\Slack_Summary_Reports.gdb'
reportsFolder = r'\\Desktop\Summary_Reports'

inLayer = slackFeatures
outputName = 'slack_summary'
outLayer = reportsGDB + "/" + outputName
statsFields = ["footage", "SUM"]
caseFields = ["NetworkID", "ProjectID", "type"]

arcpy.Statistics_analysis(inLayer, outLayer, statsFields, caseFields)

 

This gives me the Error 000800: The value is not a member of SUM | MEAN | MIN | MAX | RANGE | STD | COUNT | FIRST | LAST.

 

Inputting these parameters manually into the Summary Statistics tool works but it doesn't in the script. I am currently out of ideas to solve this and am open to ideas to try out.

 

The field footage is a Long field and works manually in the Summary Statistics tool but does not work in the script. I tried the summary statistics tool on another feature class and the custom fields we have in that are Double which the summary statistics works fine for in the script. I tried it on a Long field again for the feature class with the custom fields and the summary statistics throws back the same error.

 

Why the Summary Statistics tool not work in a script for Long fields but would work for Double fields?

Outcomes