Closed andriussi closed 4 years ago
Hi @andriussi,
Could you provide a screenshot of your Botflow and Trigger setup in the Orchestrator + a snippet or screenshot of your Pytyon script (or at least the import statements).
Looks like something is not set up or working correctly in terms of the Python interpreter.
import win32com.client as win32
def send_email():
outlook = win32.Dispatch('outlook.application')
mail = outlook.CreateItem(0)
mail.To = 'EMAIL ADDRESS'
mail.Subject = "aa"
mail.Body = "aa"
mail.Send()
send_email()
Running same script with IDLE:
And you are completely sure that the IDLE you have opened there is the same as in the specified file? What if you go to the specified Python interpreter (the one used in the Orchestrator), double-click to open the shell, then run "import win32com.client as win32"
I'm sure. also I tried this:
Just thought that this could be related to 32 vs 64 bits. Will test it now and get back
The issue was related to python versions. I had 32 bit version installed and it could not be executed with 64bit orchestrator version. When I installed 64bit python and entered that path to bot it runs without issues.
Great @andriussi
Hi
I tried to set up the orchestrator to trigger a python script instead of a Foxtrot file and got into issue with library import:
However when I run it on Orhestrator's python ("C:\AutomationOrchestrator\venv\Scripts\python.exe") file everyting runs fine.
Or if I trigger python script using python IDLE, it runs fine using the installed python (C:\Python\Python37-32)
Do you know why this could be the case?