Hi,
I have just tried to use the snippet supplied by Safe to run a Workbench from python and i get the following error
TypeError: descriptor 'runWithParameters' requires a 'fmeobjects.FMEWorkspaceRunner' object but received a 'str'
This is my code so far up to the point where these is the error:
#initiate FMEWorkspaceRunner Class
runner = fmeobjects.FMEWorkspaceRunner
#Full path to Workbench
workspace = r'C:\\Avoidance_Areas\\shape2acad2016.fmw'
#Set workspace parameters by creating a dictionary of name value pairs
parameters = {}
parametersr'SourceDataset_SHAPE'] = Avoidance_Area_shp
parametersa'DestDataset_ACAD'] = r'C:\\Avoidance_Areas\\Avoidance_Areas.dxf'
# Use Try so we can get FME Exception
try:
# Run Workspace with parameters set in above dictionary
runner.runWithParameters(workspace, parameters)
Can anyone tell me why its having this issue as im following the supplied code template.