Hi all,
I have received help to develop a python script which is used to extract information from a pdf file. The python code runs fine when run from cmd, but does not function properly when run from UiPath activities.
This is the python code:
def test(file_path):
from biokraft import app
import os
file_type = "xxx"
return_type = "json"
parsed = app.parse(
file_path=file_path, file_type=file_type, return_type=return_type
)
return parsed
If I just input some random pdf, it will run through the process and give empty values:
But if I actually input the correct file for which I want to extract the information, I would get the following error:
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.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
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)
Anyone know how to proceed here? Please advise