Image recognition sees only black screen when running process unattended


I have written an RPA process using RPA.Desktop and RPA.Windows libraries for image recognition and OCR (+ error screenshots). The process runs smoothly when running attended, but when I try to run it using Task Scheduler, the process only sees black screen for the image recognition and screenshots. The system the process is run on is a Windows 10 workstation which is managed over remote desktop connection. The process only sees black even if I am running it attended over rdp but then minimize the rdp window.

Any thoughts on the matter? Is it even possible to use the image recognition libraries for an unattended RPA process?

Thanks for answers,

  • Valtteri

Hello Valtteri and welcome to the forum!
How has been your process configured in control room? For automation that requires a desktop, you need to enable a connection

Thanks for the reply! The process at the moment is configured to be run as a python process without using the robocorp robot templates. I also do not have the control room set up for this, but was planning to use Task Scheduler for scheduling the process. Is there a way to get around the issue without using the control room? I am guessing that the RDP option keeps the screen visible for the process similarly as when I am using the RDP to view the process?

From Robocorp side we do not have any guides running pure Python with a task scheduler.

P.S. We also have a Python template available.

Is it possible to get the template anywhere else than through robocorp code? I have an issue with the activation of the extension:

Error executing: c:\Users\Pegasos_CGI\.vscode\extensions\robocorp.robocorp-code-1.3.0\bin\rcc.exe holotree variables --space vscode-base-v01-a717da --json . . .\.vscode\extensions\robocorp.robocorp-code-1.3.0\bin\create_env\conda_vscode_windows_amd64.yaml --controller RobocorpCode
Error: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
Error message: stderr maxBuffer length exceeded
Error name: RangeError
Unable to activate Robocorp Code extension because python executable from RCC environment was not provided.
 -- Most common reason is that the environment couldn't be created due to network connectivity issues.
 -- Please fix the error and restart VSCode.

Hi @valtteri.lipsanen ,

Getting a secure Desktop Session on Windows so that one does not have to keep users logged in and keep logging in after server reboots, etc. is quite an ordeal to handle :wink:

We have a pretty solid solution for it, but that does require Control Room.

BR, Kari

1 Like


The templates are also available in open-source repositories and our Portal has bunch more:

Side note: If you can get the VS Code extensions to the state that you can use the Submit Issue from our side-panel, we could take a look at what is going on… I assume you have a bunch of Python related extensions…?

BR, Kari