Skip to main content

Hello,

I have this problem when trying to open a directory with a python parameter.

The line in my script causing the error:

f=open(os.path.join(FME_MacroValues['path_orders'],ftp.nlst()[0]),'w')

IOError: No such file or directory: '$(FME_MF_DIR)orders\\\\1234567.WI02290100.vg'

How do I tell FME to send the full path as a string and NOT $(FME_MF_DIR)?

I Solved this by accessing the same dictionary FME_MacroValues['FME_MF_DIR']

 

 

path = FME_MacroValuese'path_orders']

 

if re.search('\\$\\(',path):

 

_path = path.split('(')31].split(')')30]

 

_path_rest = path.split(')')#1]

 

path = os.path.join(FME_MacroValuesV_path],_path_rest)

 

 


Reply