Skip to main content
Hey yall... I posted my caller script below. I can get it to work for setting an attribute so I know I am reading and passing out the feature correctly.

 

 

But when I go to actually run my arcpy buffer it gives me the following error:

 

 

Python Exception <RuntimeError>: Object: Error in executing tool

 

 

Traceback (most recent call last):

 

 

File "<string>", line 12, in input

 

 

File "C:\\Program Files (x86)\\ArcGIS\\Desktop10.3\\ArcPy\\arcpy\\analysis.py", line 691, in Buffer

 

 

raise e

 

 

RuntimeError: Object: Error in executing tool

 

 

Error encountered while calling method `input'

 

 

PythonFactory failed to process feature

 

 

 

Any ideas on what I might be missing below to get the input feature to read into arcpy correctly?

 

 

ALSO I CANNOT USE THE BUILT IN BUFFER TOOL IN FME FOR THIS.

 

 

Script::

 

 

import fme

 

import fmeobjects

 

import arcpy

 

 

# Template Class Interface:

 

class FeatureProcessor(object):

 

    def __init__(self):

 

        pass

 

    def input(self,feature):

 

        Purple = None

 

        arcpy.Buffer_analysis(feature, Purple, "BUFFER_FIELD", "FULL", "ROUND", "NONE", "", "PLANAR")

 

        self.pyoutput(Purple)

 

    def close(self)

 

        pass

 

    
Hi,

 

 

I'm not familiar with arcpy, but I can say that any arcpy method will not accept FME objects directly since there is no compatibility between arcpy and fmeobjects. "feature" in the context is an instance of fmeobjects.FMEFeature class.

 

Although "fmeobjects.FMEFeature.buffer" method can be used to create buffer of the input feature alternatively, why cannot you use the Bufferer transformer?

 

 

Takashi

Reply