Python Engine marcia hon  2018-02-12 12:47
Status: Closed
 
Hello,

Please help me complete the Python Engine:

I have the following:

     Language - python
     Language Version – 2.7.12
     File Extensions - .py
     Program Path - /usr/bin/python


What do I put for:
     Program Command
     Output File Name

?
 
 
zromer responded:  2018-02-14 11:43
I am also encountering a similar. I can't figure out how to get transformation scripts to execute. I used the documentation here:
https://www.labkey.org/Documentation/wiki-page.view?name=programmaticQC&_docid=wiki%3A32d707ff-ed56-1034-b734-fe851e088836

which makes it look like you'll probably want $(runInfo) in the Program Command, at least if you want access to any of the run properties within the python script. I think Output File Name will be dependent on your use case - if you want the script to write any console output (like print statements or exceptions) to a file it will write the output to the file specified in Output File Name.

My confusion comes in being unable to tell whether the script is actually getting executed, and if not how to get it to execute. I have the engine set up with $(runInfo) in the Program Command, but when the module I've added my transform script to is used to upload data the script doesn't seem to do anything. I have it set to send an email to me and write a test file just to ensure it's working but neither action is happening.
 
Jon (LabKey DevOps) responded:  2018-02-16 18:45
Hi Marcia,

You don't actually need a Program Command or Output File Name.

The Program Command is used only if you need to insert in any additional commands or arguments to Python or for any of the scripting engines. Otherwise, it will just use the default option like you're running python via the command-line. Most of the time, you'll never need to put anything here unless you're doing something really specific that requires a python argument.

The Output File Name is just used if you need the console output to go somewhere. Again, this is also not a requirement unless you want the scripting engine to generate an output file.

Please take a look at our doc on the Views and Scripting configuration page here for more information: https://www.labkey.org/Documentation/wiki-page.view?name=configureScripting

Regards,

Jon