Invoke Python Method: Pipe is broken

Hi @VC365,

Pipe is broken is a very abstract error in .net and C# and with minimal root cause. I have wasted a lot of time trying to find out why this happens without a concrete answer in the forums or in stackoverflow.

In my view, the amount of data being sent from one activity to another or one workflow to another throws “Pipe is broken.” error in UiPath. I suspect that your python code returns an object (json, og other object from python to .net) which is of a large size.

What is large?
In my tests on datatables, I found that if the datatable has more than 8000 rows and you are trying to send this to another workflow to process, then there are more chances for the “Pipe is broken” error in UiPath. In my case, I faced this error while finding unique values in a column within a large datatable (>8000 rows) and passed the datatable to another workflow. My solution was to not send the datatable to another workflow, but to process it right there within the process.

My suggestion:
Try/test by reducing the size of the object returned from Python by slicing the returned value. If that does not work please try and convert your return object to a json string.

In UiPath you can easily deserialize the return string from Python to get the json object and do any manipulations on it. Please refer this post to know how to do this from the python code and integrate this within UiPath: How to use permuation and combination in excel uipath - Help - UiPath Community Forum

Hope this gives you some ideas. Goodluck!

2 Likes