Python tasks ran from a code repository throws an error

I have python task script that I run as a local task it runs fine, when I check it into to a repo and create a task and source it from the repo, it throws this error:
Error Executing Python Task morpheus-request-gitlab - Cannot get property ‘absolutePath’ on null object

The task is simple.
import requests
x = requests.get(‘’)

In the python task I ADDITIONAL PACKAGES requests added

Is there a reason why a python task would not work through a repo and does work via a local sourced task??

What does your filepath and repo look like? Sounds like a bad path to the file itself. Should be something like:

It is not a bad path to the repo. In that I am able to see the code in the Provisioning>Code >Repository and
if I click on the Name hyperlink for the python repo integrated task it displays the code in the summary.

But, alas it was throwing git errors in the morpheus logfile when I executed the task. So i renamed the code to something else in the git repo, created a new python task in morpheus sourced the new filename from the git repo and it works now. I also turned on git caching on the git integration. Your git integration…the error it was throwing was not indicative of a git error, thanks for the hint.

Hmmm. Curious if there was a bad cache. Instead of renaming, clearing the directory cache(s) at /var/opt/morpheus/morpheus-ui/repo/git/ may help in the future.

Quick question, what version of Morpheus are you currently on and which did you most recently come from? We did recently move the execution path for Python to running on the local front end nodes, rather than the shared NFS space in HA environments to help with public cloud performances.

I have a job running that does that every 5 mins.

You have a manual job to purge that path? Shouldn’t be required to have anything like that and most likely would cause conflicts with the files. Also, defeats the git cache checkbox :wink:

No, not the path but the repos directory actually it checks each repo with a git status, if it is clean then I do nothing to it, if git status returns an error then I back up a directory and remove the git repo directory that gave the error.

Sorry the job runs every 15 mins not 5 mins.



Running on 5.4.5-2.



Chris, yep tried deleting the directory first before I resorted to recreating in a different name. Yes saw that the python virtualenv is running from morpheus-local now. In a HA env, it changed the Task execution time from 55 seconds on average to 6 - 8 seconds. HA common filesystem in this case is AWS EFS filesystem. Good stuff!