Return type from python object

Hi
my python script has to return {true, true}- if the code is runned in pycharam
but from uipath it is returning only one-true

What is the return type in Get Python Object activity?

Boolean

A Boolean returns only one value either True or False.
When you’re trying to return multiple values then your return type should be an array in UiPath.

okay we will try that

Still its throwing error. is it single dimensional/multi dimensional ?

Can you share your workflow?

Will share later, its a confidential matter. I will make some changes and share it to you.

Hi All,
I have a similar situation. I am trying to return a datatable and int value out from my python script.

though I have tried currently to return the datatable using below method:

return dataframeFinal.to_json(orient='records');

I am wondering how I can extract both datatable and int value from my python script. Any help?
NB: Below is how it looks like in UiPath:

image

image

@mayank_26 So your python script is returing both the values?
Did you tried using the python object and check whether you are able to categorize both values using the python object?

it is only giving me 1 value. :frowning:

For everyone’s info below is how I am trying to get value from python:

    dataframeFinal.to_csv(out_path, header=True, index = False)
    return dataframeFinal.to_json(orient='records'), list_length;

But when I try to extract it using UiPath, It says:

image

I tried to extract it as a Dictionary and as datatable Argument as well.

python returns tuple objects while returning multiple values within a function. So in UiPath also, declare the result of “get python object” datatype as Tuple.