Azure-pipelines-tasks: Parameter 'toolPath' cannot be null or empty.

Created on 5 Jul 2019  Â·  7Comments  Â·  Source: microsoft/azure-pipelines-tasks

@xutpuu commented on Feb 28, 2019, 12:57 PM UTC:

I add Python task and wrote inline script to run on self-hosted pool. In the build it failed with error "Parameter 'toolPath' cannot be null or empty." I tried to add tool "Use Python Version" but I can't undetstand where I should add $AGENT_TOOLSDIRECTORY.
I installed Python on build machine and added python to PATH.


Document Details

⚠ _Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking._

This issue was moved by davidstaheli from MicrosoftDocs/vsts-docs#3514.

CrossPlatform bug

Most helpful comment

I had the same issue. The solution for me was to explicitly set the Python interpreter path in the task.

image

All 7 comments

@colindomoney commented on Mar 17, 2019, 11:22 AM UTC:

I had a similar issue - I ended up doing a local install of Python 3.6.5 from source using the --prefix option to locate this inside my _work/_tool directory. I also had to create a symlink to python3 to python or I got the above message. I'll write this up in detail and post here - it is possible to get this to work.

@davidstaheli commented on Jul 5, 2019, 6:49 PM UTC:

Thanks for reporting this. We're going to move this issue to this repo:
https://github.com/Microsoft/azure-pipelines-tasks

/move to Microsoft/azure-pipelines-tasks

@xutpuu Are you still having this issue?

The PythonScript task will take in an optional path for pythonInterpreter or attempt to find python on the path

Can you verify that you added python to the path (and not python3 or something similar)?
You can also just try inputting the path to where your python is installed using the pythonInterpreter input option.

Let me know if that helps

I had the same issue. The solution for me was to explicitly set the Python interpreter path in the task.

image

Closing this out with an action item to improve docs. Re-open if you still see this is an issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheRealEdwardCullen picture TheRealEdwardCullen  Â·  3Comments

alexszilagyi picture alexszilagyi  Â·  3Comments

jabbera picture jabbera  Â·  3Comments

divyesh-parikh picture divyesh-parikh  Â·  3Comments

timfish picture timfish  Â·  3Comments