Skip to main content
Solved

How to pass an filename (from excel reader) to systemcaller (python script)?

  • April 17, 2025
  • 1 reply
  • 17 views

norris
Contributor
Forum|alt.badge.img+3

I am fairly new to FME and I am trying to pass an Excel file pathname to systemCaller so I can use it in a Python script. I need to use the SystemCaller as I am using a bat file to change virtual environment and then call Python.

What I am trying to do is get FME to just pass the Excel filename via a user parameter to SystemCaller using this statement

"C:\temp\Excel_processing.bat" --input "$(excel_infil)"

where excel_infil = “C:\temp\Excel_processing\infile.xls”

But I get a “File path is incorrect” error in the logger (not in english, so the error is a translation). I have even tried to just hardcode the input filename to the statement but get the same error. I tried this:

"C:\temp\Excel_processing.bat" --input “C:\temp\Excel_processing\infile.xls”

 

If i just use the statement "C:\temp\Excel_processing.bat" in SystemCaller, then I dont have any issues and the .bat/python script works as expected but I need FME to pass the filename along. 

I have a bunch of echo statements in the .bat file but FME doesnt even run the .bat file, so my statement is incorrect.

Any ideas why my statement is not working?

Best answer by norris

I found my error! turns out I had the wrong varible set in the .bat file. sigh

View original
Did this help you find an answer to your question?

1 reply

norris
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • Best Answer
  • April 17, 2025

I found my error! turns out I had the wrong varible set in the .bat file. sigh


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