Hi Jeff,
The python bindings unfortunately require the definition of a constraint and a projection (list of desired attributes. Doing
schedd.history(constraint=None, projection=[], match=10) will return the full job ad for the first 10 queried ads in the history file.
Cheers,
Cole Bollig
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Jeff Templon <templon@xxxxxxxxx>
Sent: Monday, May 27, 2024 3:54 AM To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx> Subject: [HTCondor-users] Error using history method of htcondor python bindings Hi,
Querying the schedd works fine. But history?
ArgumentError Traceback (most recent call last) Cell In[36], line 2 1 schedd = htcondor.Schedd() ----> 2 shist=schedd.history( constraint=None, match=10) 3 # projection=["ClusterId", "ProcId", "Out", "JobStatus", "QDate", "AccountingGroup", "Owner", "JobCurrentStartDate"], File /data/datagrid/templon/pyenv/versions/miniforge3-23.3.1-1/envs/sbng/lib/python3.12/site-packages/htcondor/_deprecation.py:111, in deprecate_8_9_8.<locals>.normalize_query_args.<locals>.wrapper(self, *args, **kwargs) 108 @wraps(method) 109 def wrapper(self, *args, **kwargs): 110 kwargs = _normalize_query_args(method, kwargs) --> 111 return method(self, *args, **kwargs) File /data/datagrid/templon/pyenv/versions/miniforge3-23.3.1-1/envs/sbng/lib/python3.12/site-packages/htcondor/_lock.py:70, in add_lock.<locals>.wrapper(*args, **kwargs) 67 try: 68 acquired = LOCK.acquire() ---> 70 rv = func(*args, **kwargs) 72 # if the function returned a context manager, 73 # create a LockedContext to manage the lock 74 is_cm = is_context_manager(rv) ArgumentError: Python argument types in Schedd.history(Schedd) did not match C++ signature: history(Schedd {lvalue} self, boost::python::api::object constraint, boost::python::list projection, int match=-1, boost::python::api::object since=None) What am I missing? The python bindings should be up-to-date, I installed them this morning.
JT
|