Skip to main content
Question

StatisticsCalculator Error: Python Exception


Forum|alt.badge.img
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

david_r
Celebrity
  • April 23, 2015
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

Forum|alt.badge.img
  • Author
  • April 27, 2015
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").


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings