12-30-2019 11:06 AM
Does anyone have any suggestions for passing a multiline string as a function parameter while using the Labview Python Node? In the attached "PythonExampleWithMultiLineError.vi" I get a Python TypeError for the "message" parameter. When I run the SendPlainText function in my Python IDE (Sublime Text) I need to pass the parameter as a multiline string using triple quotes (""" string """) and it works fine with no TypeError returned. However, I don't know how to pass this parameter as a multi-Line string to the Python Node. I have tried encapsulating it in triple quotes in the front panel string control but Labview just interprets the triple quotes as part of the string.
If you plug in valid email account info to the VI instead of the sample Don & Nancy info there now the SendPlainText function works and sends the email but I get a TypeError returned in the Labview Error Out indicator.
12-30-2019 12:07 PM
You have configured the Python node to return a string but SendPlainText has no return value.
Multi-line strings are no big deal, just pass them directly into the Python node. Triple-quotes and such are interpreter constructs and not required in this situation.