Question

StatisticsCalculator Error: Python Exception

  • 21 April 2015
  • 3 replies
  • 4 views

Badge
Hi All,

 

 

I am using the StatisticsCalculator transformer to, obviously, get statistics on a set of attributes for a group of records. However, I am running into an error that I have never seen before and I have used the StatisticsCalulator multiple times for the similar workspace data flows. See error below:

 

 

Python Exception <NameError>: global name 'xformer' is not defined@Python failed to execute function `StatisticsCalculator.summarizeStatistics'

 

 

StatisticsCalculator_UnneededInputNuker: @Python execution failed

 

 

StatisticsCalculator_UnneededInputNuker: @Python execution failed

 

 

My research on this issue only produced mentions of this Global Name error when inputing a custom transformer or using Python caller. This is coming from a transformer from within the FME library. Has anyone experienced a similar issue and found a resolution? Happy to provide more context on my workspace if needed.

3 replies

Userlevel 4
Hi,

 

 

the StatisticsCalculator transformer is indeed implemented in Python. First, make sure that you haven't specified a custom Python interpreter that's causing problems (Tools / FME Options / Runtime).

 

 

If that doesn't work, consider reinstalling FME.

 

 

David
Badge
David,

 

 

Thank you for the response. I wanted to post my resolution in hopes that it may help someone else in the future....

 

 

This issue turned out to be the result of inconsistencies in the input data type. Some records were Digits and some were Double. Using a StringFormatter, I was able to map them all to double with a set number of decimals and I no longer had the issue. Although I was able to eventually figure this out, I wish that the error message had not been so cryptic.

it also happens when a string accidently gets included in the data. (eg, when the data is made by a division, dividing by 0, resulting in "inf").

Reply