[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] schedd.Submit() method in htcondor2



Hello,

I am trying to migrate from htcondor to htcondor2. I have the following Submit() call [1], but I am getting the following error:


Traceback (most recent call last):
 File "/data/python2025/submit2_items2.py", line 22, in <module>
  submitRes = schedd.submit(sub, itemdata=iter(itemdata))
 File "/usr/lib64/python3.9/site-packages/htcondor2/_schedd.py", line 434, in submit
  if first_from == 0 or queue_args[first_from - 1] == " ":
IndexError: string index out of range


What is wrong?
In htcondor, this worked, but I had to include count
submitRes = schedd.submit(sub,1, itemdata=iter(itemdata))


[1]
import classad2 as classad
import htcondor2 as htcondor

sub = htcondor.Submit("""
    universe = vanilla
    executable = test.sh
    arguments = 3
    max_idle = 1
    output = out.$(Cluster)-$(Process)
    log = log.$(Cluster).log
    """)

itemdata = []
undefined = "UNDEFINED"
for name in ("Job1", "Job2"):
  itemdata.append({"My.JobName": classad.quote(name)})
  #itemdata.append({"My.JobTask": undefined})

schedd = htcondor.Schedd()
#submitRes = schedd.submit(sub, 1, itemdata=iter(itemdata))
submitRes = schedd.submit(sub, itemdata=iter(itemdata))
clusterId = submitRes.cluster()
print("ClusterId = %s" % clusterId)