Skip to main content
I am getting the following error that is causing a fatal crash in my workbench.  Appears to be a problem with the native python code of the statistics calculator.   Has anyone every seen this and is there a work around?  Note that the it does not fail and any specific feature so difficult to troubleshoot if the data is causing the issue.

 

 

 

 

2013-04-14 19:27:53|1787.9|  0.0|WARN  |Traceback (most recent call last):   File "C:\\Program Files\\FME\\transformers\\StatisticsCalculator.py", line 87, in summarizeStatistics     Transformer.instance(xformerName).summarizeStatistics(feat,outputType)   File "C:\\Program Files\\FME\\transformers\\StatisticsCalculator.py", line 131, in summarizeStatistics     results = statisticians=groupKey].outputStats()   File "C:\\Program Files\\FME\\transformers\\StatisticsCalculator.py", line 232, in outputStats     FMELogfile().logMessageWithParams(917353,Wxformer.instanceName(),xformer.paramMap()x'STDEV_ATTR']],FME_WARN) KeyError: 'STDEV_ATTR'   2013-04-14 19:27:53|1787.9|  0.0|WARN  |Python Exception <<type 'exceptions.KeyError'>>: 'STDEV_ATTR' 2013-04-14 19:27:53|1787.9|  0.0|FATAL |@Python failed to execute function `StatisticsCalculator.summarizeStatistics'
Hi,

 

 

I'm guessing that you're using FME2011? It seems that the Python code for this transformer has undergone quite a few changes since then. I would recommend that you upgrade FME.

 

 

Remeber that it is possible to have several separate installations of FME on the same machine, something that makes upgrades and testing a lot easier.

 

 

David
By the way, it seems like it's the calculation of the standard deviation that fails here. Check that you have entered a valid attribute name for this value.

 

 

You could also consider posting a print screen of the transformer settings here.

 

 

David
Hi David.  Thanks.

 

 

Yes i am using FME2011 but unfortunately i need to stay on this version for the near term.

 

 

Here is a screen shot.   i am acutually not outputing standard deviation which was confusing me as well.   Also i should add that this is 1 of three stats calcs that i am running parallel and the other 2 work fine.   This lends to be belewive is is something with the input attribute data however i cannot seem to see much wrong with the data at all.

 

 

  
Hi,

 

 

thanks for the feedback. I suspect you are right regarding the data being the culprit here. Perhaps it could be interesting to insert an AttributeClassifier on the attribute used by the StatisticCalculator. You could then filter out all features with non-numeric values to a Logger. This might give you an idea where the error lies.

 

 

Unfortunately I cannot see a screenshot below, you will have to first upload it to a hosting site (dropbox.com, imgur.com, etc) before you can link to it here.

 

 

David
 have fixed the issue by simply entering in an attribute in the standard dev output field.  I was not using this and it was blank, like most of the others, however entering in a dummy named seem to resolved the issue.  thanks for your help.

Reply