I have searched the forum and have not seen an answer that solves this for me. I have been using invoked python methods (and some existing robots are still working with this method) for a number of years. However, after the last upgrade 2021.10.4 I am getting the error below, generated from the invoke python method activity.
I have tried this on a number of different python code bases to see if it changed the outcome and the summary is:
- If the python code base invoked is a single function on a single file and does not import another function it works and has no parameters
- If the python code base invoked is a single file with the called function then invoking other functions in the same file this works even with parameters
- If the the called function imports a function from another python file, even if it doesn’t use it, the error appears, with or without parameters.
This does not appear to be a file size issue as my test cases are just sending json text back and forth (as I have seen commentary that this error can be caused by large files). And in scenarios 1 and 2 it works so it isn’t my python install or version or scope activity.
Am I missing something, or is this a limitation? For some of my projects I can make it work with a single file with multiple functions but I would prefer not to compromise the python project structures.
Note that the older robots that utilise python fit example 3 and are still working.
To trouble shoot this I have:
- Reinstalled studio
- Reinstalled the python packages
- started a completely new project to test the scenarios above
RemoteException wrapping System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.CheckWriteOperations()
at System.IO.Pipes.PipeStream.Flush()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.set_AutoFlush(Boolean value)
at UiPath.Python.Service.PythonProxy.RequestAsync(PythonRequest request, CancellationToken ct)
at UiPath.Python.Service.PythonProxy.Shutdown()
at UiPath.Python.Impl.OutOfProcessEngine.Release()
at UiPath.Python.Activities.PythonScope.Cleanup()
at UiPath.Python.Activities.PythonScope.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)