Skip to content

`jman submit` needs the `--name` argument to be passed

When submitting a job without a name (at lease locally), printing the job list does not work anymore:

$ jman -lvv submit -- xxx
INFO gridtk: Added job '<Job: 1 (1)> | local : submitted -- '[...]/xxx' ' to the database

$ jman ls
  File "[...]/envs/bob/lib/python3.7/site-packages/gridtk/models.py", line 337, in format
    return format.format(self.unique, job_id, queue[:12], status, self.name, command_line)
TypeError: unsupported format string passed to NoneType.__format__

When adding a job name, everything works as expected:

$ jman del
$ jman -lvv submit -n name -- xxx
INFO gridtk: Added job '<Job: 1 (1)  - 'name'> | local : submitted -- '[...]/xxx' ' to the database

$ jman ls
job-id       grid-id          queue        status         job-name    
======  =================  ===========  ============  ================  
  1             1             local      submitted          name        

I suppose that the issue is that None is not supported in a str.format() (at least not in python 3.7).