Skip to main content

Happening in Parent just before Workspace Runner

Excerpt from log:

WorkspaceRunner_2: Running FME Workspace E:\\supply\\Standard_Supply\\SQL_Server\\10km_Buffer_to_SQL_Supply/SQL_Server_County_10K_Buffer_Supply.fmw with command line:

2023-07-25 16:30:02|  1.0| 0.0|INFORM|WorkspaceRunner_2: {C:/Program Files/FME2021/fme} E:/servername/Standard_Supply/SQL_Server/10km_Buffer_to_SQL__Supply/SQL_Server_County_10K_Buffer_Supply.fmw --INPUT_POLYGON E:<backslash>supply<backslash>Common_Dependencies<backslash>Esri_Shapefile<backslash>10k_Buffer_Local_Authorities<backslash>COUNTY.shp --QUARTER 2023Q3 --OUTPUT_COORD_SYS IRELAND-ITM --SQL_SERVER_BACKUP {\\<backslash><backslash>servername<backslash>e<dollar><backslash>SQLData<backslash>CountyCouncil<backslash>ITM<backslash>2023_Q3<backslash>COUNTY<backslash>2023Q3_COUNTY_ITM.bak} 16:30:05|  1.0| 0.0|WARN |WorkspaceRunner_2: Failed to run workspace E:/supply/Standard_Supply/SQL_Server/10km_Buffer_to_SQL_Supply/SQL_Server_County_10K_Buffer_Supply.fmw -- Trace was:

 

        FME 2021.0.1.0 (20210404 - Build 21313 - WIN64)

           FME Database Edition (node locked-crc)

            Temporary License: 189 days left.

            Machine host name is: OSIHP2SUP

Operating System: Microsoft Windows Server 2012 R2 Server 4.0 64-bit (Build 9600)

         Copyright (c) 1994 - 2021, Safe Software Inc.

                Safe Software Inc.

 

INFORM: FME_END_PYTHON: evaluating python script from string...

ERROR : Python Exception <FileNotFoundError>: rErrno 2] No such file or directory: ''

ERROR : Error executing string `import sys

import fme

import fmeobjects

import webbrowser

import urllib.request

import base64

 

Hello @buttonsmc​, thanks for sharing the error, sorry you're running into this issue! It may be helpful if you can share a copy of your script. Also, are you able to confirm the same script can run outside of FME? Happy to help, Kailin.


Hello @buttonsmc​, thanks for sharing the error, sorry you're running into this issue! It may be helpful if you can share a copy of your script. Also, are you able to confirm the same script can run outside of FME? Happy to help, Kailin.

Hi @kailinatsafe​ , thank you for your reply, so there are two python callers that are run just before this workspace runner to create folders:

The first one is as follows:

import fme

import fmeobjects

import os

 

def processFeature(feature):

  output_dir = feature.getAttribute('quarterly_folder')

   

  # Checks if output directory exists and, if not, it creates it

  if os.path.exists(output_dir) == False:

    os.mkdir(output_dir)

 

The second one is :

import fme

import fmeobjects

import os

 

def processFeature(feature):

  output_dir = feature.getAttribute('destination_folder')

   

  # Checks if output directory exists and, if not, it creates it

  if os.path.exists(output_dir) == False:

    os.mkdir(output_dir)

 

The process seems to run through these with no issue and then falls over just as it trys to run the workspace runner in the parent.

 

workspace runner that the parent feeds into works as expected when run on its own with parameters added in manually.

 

I hope that makes sense?

Thanks,

Tauna

 


Hi @kailinatsafe​ , thank you for your reply, so there are two python callers that are run just before this workspace runner to create folders:

The first one is as follows:

import fme

import fmeobjects

import os

 

def processFeature(feature):

  output_dir = feature.getAttribute('quarterly_folder')

   

  # Checks if output directory exists and, if not, it creates it

  if os.path.exists(output_dir) == False:

    os.mkdir(output_dir)

 

The second one is :

import fme

import fmeobjects

import os

 

def processFeature(feature):

  output_dir = feature.getAttribute('destination_folder')

   

  # Checks if output directory exists and, if not, it creates it

  if os.path.exists(output_dir) == False:

    os.mkdir(output_dir)

 

The process seems to run through these with no issue and then falls over just as it trys to run the workspace runner in the parent.

 

workspace runner that the parent feeds into works as expected when run on its own with parameters added in manually.

 

I hope that makes sense?

Thanks,

Tauna

 

Hello @buttonsmc​, it seems like the WorkspaceRunner itself is working fine, but failing to run the second (or child) workspace. If you manually enter the parameters and all works correctly, I suspect the issue could be with one of the WorkspaceRunner parameters you have set up or even one thats being referenced in the second workspace/script. Are you able to share the script of the child workspace? and potentially a screenshot of your WorkspaceRunner parameters? I think more information about the child workspace being run would be helpful, if you're able to share! Also, I wasn't sure if I just missed this portion of the response, but have you tested the script runs outside of FME Form?

 

Side note - I wonder if you could combine both PythonCallers in the parent workspace into a single PythonCaller? Happy to help, Kailin.


Reply