How to post argument to python script being called in SSIS Execute Process Task?

  • Hey Guys, I have an execute process task in ssis that is calling a python script. Execute process settings I have set as follows.

     

    RequireFullFileName: True

    Executable: C:\Users\Me\AppData\Local\Programs\Python\Python38-32\python.exe

    Arguments: "C:\Users\Me\Documents\My Received Files\teststring.py HelloWorld"

    FailTaskIfreturnCodeIsNotSuccessValue: True

    SuccessValue: 0

    TimeOut:0

    Im getting the following error when I run it

     

    [Execute Process Task] Error: In Executing "C:\Users\Me\AppData\Local\Programs\Python\Python38-32\python.exe" ""C:\Users\Me\Documents\My Received Files\teststring.py HelloWorld"" at "", The process exit code was "2" while the expected was "0".

     

    How do I handle passing in an parameter?

    • This topic was modified 4 years, 11 months ago by  dndaughtery.
  • Can you try the same thing, but using a file path which does not contain spaces?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Tried setting

     

    Still getting error:

     

    [Execute Process Task] Error: In Executing "C:\Users\DaughteryDa\AppData\Local\Programs\Python\Python38-32\python.exe" "C:\Users\DaughteryDa\Documents\My Received Files\teststring.py Whats" at "", The process exit code was "2" while the expected was "0".

  • I created an expression for Argument and that worked

     

     

     

  • I created an expression for Argument and that worked

    Good idea, well done.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply