ML integration with Blue Prism

Sachin_Kharmale

Active Member
Hi @sambrao ,
1.Write your python script code in
separate .py file. then save .py file on Local Drive.
2.Write program in code stage to execute python code and it will give you output that you want.
3.Make sure you have installed pandas package in your python env.
4.Make sure your import should be on first line remove first print statement from program.
5.Follow all steps which is given in https://www.rpaforum.net/threads/ml-integration-with-blue-prism.8021/#post-27097 Post.

I hope it will help you..!
 

ramani60091

New Member
Hi Friends,

I need to attach a Python Method with Parameter Arguments.
Kindly let me know how to pass in the & get the output value using Code Stage. A sample Python code and execution is given below:

***Here is the sample Python Script:--

class P:
age = 25
def __init__(self, name, alias):
self.name = name # public
self.__alias = alias # private

def who(self):
print('name : ', self.name)
print('alias : ', self.__alias)
return('True')

***Execution of Python:--

x = P('Ramani','N')
result = x.who()
print(result)

Looking forward to your reply.

Thanks and regards,
Ramani Nagarajan
 

juan_camacho

New Member
Hi, Can you help me please?

When I run my script, the Output Success is True, but the Result is Empty and the code didn´t do anything
 

ananyagupta

New Member
Yes, the issue I have been faced When I run that script, the Output Success is True and easy to apply, but the Result is nothing why did it happen please resolve my query. I have a little bit of knowledge about ML because now I start to learn from CETPA Infotech.
 

schankot

New Member
Hi,
I am working on one process, where We have multiple pdf files and we need to merge that all pdf files into one pdf file. Does anyone have an idea how can we do this? I read above solutions that are not working for me.
 
Hi,

I am trying to run a python script. However, I have not Python installed neither I have the permissions to install it.

So, after searching a little bit I found that it is possible to run it in Blue Prism through code stage.

I have the following external references at the initializa.dll installed:
Code:
System.dll
System.Data.dll
System.Xml.dll
System.Drawing.dll
Microsoft.CSharp.dll
System.Core.dll
Microsoft.Scripting.Metadata.dll
Microsoft.Scripting.dll
Microsoft.Dynamic.dll
IronPython.dll

I have the following namespaces imported:
Code:
System
System.Drawing
System.Data
System.IO
System.Runtime
Microsoft.Scripting.Hosting
IronPython.Hosting

The code stage takes as inputs:
python_script (the path to the script to be executed)
input_pdf_path (the file path)
target_folder (the folder where images are to be stored)

The code:
C#:
ScriptEngine pythonEngine = Python.CreateEngine();
dynamic scope = pythonEngine.CreateScope();
pythonEngine.ExecuteFile(python_script, scope);
scope.convert_to_image(input_pdf_path, target_folder);

However, when I run it Blue Prism returns the following message:
Internal : Exception: Object reference not set to an instance of an object.

Why is this happening? Can someone please help?
 
Top