Skip to content

PBSCluster is broken: 'PBSCluster' object has no attribute 'name' #24

Description

@guillaumeeb

Probably my mistake in one of the commit on #10:
It seems that name attribute is not initialized in core.py, leading to:

In [6]: cluster = PBSCluster(threads=6, job_extra=['-m ae'], queue='regular')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-88770ff01410> in <module>()
----> 1 cluster = PBSCluster(threads=6, job_extra=['-m ae'], queue='regular')

~/miniconda3/envs/dask_dev/lib/python3.6/site-packages/dask_jobqueue-0.1.0-py3.6.egg/dask_jobqueue/pbs.py in __init__(self, queue, project, resource_spec, walltime, job_extra, **kwargs)
     69 
     70         #PBS header build
---> 71         if self.name is not None:
     72             header_lines = ['#PBS -N %s' % self.name]
     73         if queue is not None:

AttributeError: 'PBSCluster' object has no attribute 'name'

And obviously, self.name is never initialized.

A PR is incoming for fixing this and other issues.
We should set up basic unit tests :)!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions