Get Python Object: Error converting Python object - return(dataframe) from Python script

Hello All,

I have a python script where I am adding few rows to a data frame and want to get it as output from Python to UiPath but getting this error.

My UiPath variable is OutputDatatable of type System.Datatable and same data type I have selected for TypeArgument property of Get Python Object activity.

Please help with this. How to get dataframe/datatable as output from python script?

@shubhamkumar.tiwari

this datatype has an issue…as a workaround you can try this …to serialize the dataframe to string and then deserialize to datatable in UiPath

cheers

Thanks for the suggestion Anil. Is it possible for you to send the xaml?

Hello Anil,

I tried this but now I am getting Pipe broken error:

“message”: “Invoke Python Method: Pipe is broken.”,

@shubhamkumar.tiwari

Did you import json?

You need to import json

Here is the sample project with xaml and py file as well

BlankProcess7.zip (178.2 KB)

Cheers

Thanks for this Anil but I am not able to open this xaml. If possible can you remove unused dependencies and then send the xaml again please?

@shubhamkumar.tiwari

please find attached the removed one…also my python version is 3.12 change the path and all as per yours

BlankProcess7 (2).zip (94.9 KB)

first run the .py file and check if it is working and then use

cheers