Another question! I have a Python script that takes two parameters, a string and a list of strings containing two names.
def send_message(text,names = []):
in order to send a message to two people. I’m automating this using UiPath and have a list containing the two names that I want to send the ‘text’ to, but I am getting an error saying
Error invoking Python method —> RemoteException wrapping System.ServiceModel.CommunicationException: There was an error while trying to serialize parameter http://UiPath.Python.Host:args. The InnerException message was 'Type ‘System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]’ with data contract name ‘ArrayOfstring:http://schemas.microsoft.com/2003/10/Serialization/Arrays’ is not expected.
when I try to pass the list I’ve created as an input parameter. Am I doing something wrong when I pass the list into Python? Thanks!
As it is working for you, try this
loop through the list in the python code itself and then add each value in the list to a string and return that string
As I understand, you are trying to remove the duplicates in the code, that you can do using the existing activities by adding all the values to a array string type
I forgot to add arguments in python method. add it and run.
I need to pass list for other purpose. each value not a good idea. if it is possible to pass list