Unable to run external program (python) on easymorph server

Hi,

I dont know if this has been addressed before, I am trying to shift the EM pipeline on my desktop to the EM server. I run a python program to perform a task using the ‘run program’ action. The python program runs fine on my desktop, but when I move the same project onto the server, it never recognizes the external program. I have installed python on the EM server machine.

I tried searching in similar topics and could not find a solution to this. May be I am missing something.

Thanks

By default, EasyMorph Server is running under account NT AUTHORITY/LocalService, not the account under which it was installed. The LocalService account is a special account for Windows services. It has fewer privileges than a regular user account. Make sure that the folder with Python installation can be accessed by the account used to run EasyMorph Server, be it LocalService or any other account.

Hi @dgudkov

I’m getting a similar type of error:

The task works fine on the server using the desktop client.

I checked the permissions:

I would be grateful for your assistance.

Thanks

Shaheed

It’s a question of configuring system variables for Python. It’s not related to EasyMorph.

Either use the full path to the Python executive, e.g.

"C:\Users\user x\AppData\Local\Programs\Python\Python36\python.exe" myscript.py

Or add the path to python.exe to the system variable PATH for the Windows account that is used to run EasyMorph Server.

Try also googling “Can’t find a default python”.

@dgudkov

I think I have the same kind of problem. I have a project where I used the cmd action and in that action I do a git command.

I get an error when I run it on EM-server like:

External program failed with exit code 128; path=cmd.exe; args=/C git rev-parse HEAD; workdir=

I have added the path to git cmd in both system and user environment variables. There are 2 users on the windows server. I installed EM-server with one of the users. So I added the environment variables for that windows user.

How do I know which user is used by EasyMorph server when running tasks because apparently, it does not find the git cmd?

Why is it apparently? Code error 128 can be anything. Capture the error message from the action and see what it says.

@dgudkov

I was able to redirect std err output stream to a file in order to see the error. On my desktop I could not see the error because there it was working fine.

The problem was about dubious ownership of the GIT-repo.

The repo is on a shared drive. I cloned it from our remote repo. As the repo is originally created on another machine, it raised the error as far as I understand this issue.

In order to make it possible for the EasyMorph Server NT AUTHORITY/LOCAL SERVICE to execute the git command, I had to execute the following command on the machine which hosts the EM-server application.

git config --system --add safe.directory '%(prefix)///path_to_my_network_drive'

The suggested command by GIT i.e. the same command as above but with the --global flag instead of --system was not enough to resolve the problem.