I have tried to run most of the methods available for WebMOREST, and while most are working, the following methods still are not working for me:
- 404 Client Error: Not Found was returned for the following methods: get_engines(), get_templates()
403 Client Error: Forbidden was returned for the following methods: get_job_archive(), get_job_spreadsheet()
Timeout waiting for response from Javascript: was returned for: async display_job_property()
422 Client Error: Unprocessable Entity was returned for: submit_job()
I did not try: generate_input(), wait_for_job(),wait_for_jobs()
Code: Select all
import webmo
import webmo.util
from pprint import pprint
from webmo import WebMOREST
from requests import HTTPError
import json
import io
Code: Select all
URL = "https://SERVER/~webmo/cgi-bin/webmo/rest.cgi"
username = "USER"
Code: Select all
job = JOB
try:
#obtain a REST session
rest=webmo.WebMOREST(URL,username)
#obtain results from the specified job number
results = rest.get_job_results(job)
pprint(results["comment"])
#Catch any HTTP / REST exceptions and log the underlying cause
except HTTPError as e:
print("Error during REST request: %s" % e)
Code: Select all
try:
engines = rest.get_engines()
print("Please choose an engine")
pprint(list(engines_keys()))
#Catch any HTTP / REST exceptions and log the underlying cause
except HTTPError as e:
print("Error during REST request: %s" % e)