- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- Re: Python tasks ran from a code repository throws...
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 07:29 AM
05-19-2022 07:29 AM
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(‘https://www.microsoft.com’)
print(x.status_code)
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??
- Tags:
- Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 07:55 AM
05-19-2022 07:55 AM
Re: Python tasks ran from a code repository throws an error
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 10:22 AM
05-19-2022 10:22 AM
Re: Python tasks ran from a code repository throws an error
Running on 5.4.5-2.
Tks,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 10:21 AM
05-19-2022 10:21 AM
Re: Python tasks ran from a code repository throws an error
Chris,
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.
Tks,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 08:05 AM
05-19-2022 08:05 AM
Re: Python tasks ran from a code repository throws an error
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 09:02 AM
05-19-2022 09:02 AM
Re: Python tasks ran from a code repository throws an error
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 ![]()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 08:27 AM
05-19-2022 08:27 AM
Re: Python tasks ran from a code repository throws an error
I have a job running that does that every 5 mins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2022 09:15 AM
05-20-2022 09:15 AM
Re: Python tasks ran from a code repository throws an error
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!
Tks,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2022 07:32 AM
05-19-2022 07:32 AM
Re: Python tasks ran from a code repository throws an error
What does your filepath and repo look like? Sounds like a bad path to the file itself. Should be something like: