pysqa icon indicating copy to clipboard operation
pysqa copied to clipboard

[feature] pysqa error message does not help much

Open samwaseda opened this issue 5 months ago • 0 comments

from pysqa import QueueAdapter

QueueAdapter()

raises the error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[30], line 3
      1 from pysqa import QueueAdapter
----> 3 QueueAdapter()

File [~/conda/lib/python3.11/site-packages/pysqa/queueadapter.py:77](https://jupyter-cloud.gwdg.de/jhub/user/0741289/lab/tree/RESEARCH/2024/0909/UNITS/conda/lib/python3.11/site-packages/pysqa/queueadapter.py#line=76), in QueueAdapter.__init__(self, directory, execute_command)
     75     primary_queue = config["cluster_primary"]
     76 else:
---> 77     raise ValueError(
     78         "Neither a queue.yaml file nor a clusters.yaml file were found in "
     79         + directory
     80     )
     81 self._adapter = self._queue_dict[primary_queue]

ValueError: Neither a queue.yaml file nor a clusters.yaml file were found in ~/.queues

At this point, it should tell how to generate batch files. There should be a function like pysqa.install.generate_flux or pysqa.install.generate_slurm that generates files given here.

samwaseda avatar Sep 17 '24 14:09 samwaseda