# Pipetask - QuantumGraph issues

**URL:** <https://www.rubin.community/t/pipetask-quantumgraph-issues/5807>\
**Category:** Support\
**Tags:** butler\
**Created:** [August 17, 2021, 10:21pm UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807 "2021-08-17T22:21:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmegias](https://avatars.discourse-cdn.com/v4/letter/g/d07c76/32.png) [@gmegias](https://www.rubin.community/u/gmegias)\
**Post date:** [August 17, 2021, 10:21pm UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/1 "2021-08-17T22:21:32Z")

</div>

Hi all,

I am trying to debug a notebook that should be reproducing a file that runs successfully when run from the main RSP Terminal.

My issue is when running the following code line:

`pipetask run -b /project/gmegias/aos/lsst_stack/perturbations/phosimData -i refcats,LSSTComCam/raw/all,LSSTComCam/calib --instrument lsst.obs.lsst.LsstComCam --register-dataset-types --output-run ts_phosim_1151 -p comcamPipeline.yaml -d "exposure IN (4021114101151, 4021114101152)" -j 2`

I tried running this line of code from the LSP terminal to see if I could get an insight on what was going on, but the following error prompts up:

```
    py.warnings WARN: /opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/ctrl_mpexec/21.0.0-33-g1dfc228+1cc4008e43/python/lsst/ctrl/mpexec/cli/script/qgraph.py:145: UserWarning: QuantumGraph is empty
  qgraph = f.makeGraph(pipelineObj, args)

Traceback (most recent call last):
  File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/ctrl_mpexec/21.0.0-33-g1dfc228+1cc4008e43/bin/pipetask", line 29, in <module>
    sys.exit(main())
  File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/ctrl_mpexec/21.0.0-33-g1dfc228+1cc4008e43/python/lsst/ctrl/mpexec/cli/pipetask.py", line 43, in main
    return cli()
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/lsst/software/stack/conda/miniconda3-py38_4.9.2/envs/lsst-scipipe-0.6.0/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/ctrl_mpexec/21.0.0-33-g1dfc228+1cc4008e43/python/lsst/ctrl/mpexec/cli/cmd/commands.py", line 102, in run
    qgraph = script.qgraph(pipelineObj=pipeline, **kwargs)
  File "/opt/lsst/software/stack/stack/miniconda3-py38_4.9.2-0.6.0/Linux64/ctrl_mpexec/21.0.0-33-g1dfc228+1cc4008e43/python/lsst/ctrl/mpexec/cli/script/qgraph.py", line 148, in qgraph
    raise RuntimeError("QuantumGraph is empty.")
RuntimeError: QuantumGraph is empty.

```

If anyone has any idea of what could I be doing wrong, I would appreciate a lot your support!

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [August 18, 2021, 12:09am UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/2 "2021-08-18T00:09:50Z")

</div>

Here is a discussion on empty quantum graphs that might help you.

[https://pipelines.lsst.io/v/daily/middleware/faq.html?highlight=empty#how-do-i-fix-an-empty-quantumgraph](https://pipelines.lsst.io/v/daily/middleware/faq.html?highlight=empty#how-do-i-fix-an-empty-quantumgraph)

Can you post a link to your `comcamPipeline.yaml` ?

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [August 18, 2021, 12:11am UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/3 "2021-08-18T00:11:43Z")

</div>

> [@gmegias](#):
>
> exposure IN (4021114101151, 4021114101152)"

Can you also run `butler query-datasets` to check that those exposures really are present in that `LSSTComCam/raw/all` collection?

---

<div class="post-metadata">

**Author:** ![andy\_slac](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/andy_slac/32/1726_2.png) [@andy\_slac](https://www.rubin.community/u/andy_slac)\
**Post date:** [August 18, 2021, 1:42am UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/4 "2021-08-18T01:42:35Z")

</div>

I can only see exposures 4021123101151 and 4021123101152 in `LSSTComCam/raw/all` collection .

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [August 18, 2021, 3:25pm UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/5 "2021-08-18T15:25:14Z")

</div>

If this is phosim on-sky data then not running `butler define-visits` is a possibility (that is covered in the FAQ).

---

<div class="post-metadata">

**Author:** ![gmegias](https://avatars.discourse-cdn.com/v4/letter/g/d07c76/32.png) [@gmegias](https://www.rubin.community/u/gmegias)\
**Post date:** [August 18, 2021, 5:18pm UTC](https://www.rubin.community/t/pipetask-quantumgraph-issues/5807/6 "2021-08-18T17:18:34Z")

</div>

I think that was the issue. The problem is now solved. See follow-up issue in:

> [@Issue running pipetask from RSP notebook](http://www.rubin.community/t/issue-running-pipetask-from-rsp-notebook/5808):
>
> When running the following code line: pipetask run -b /project/gmegias/aos/lsst\_stack/perturbations/test/phosimData -i refcats,LSSTComCam/raw/all,LSSTComCam/calib --instrument lsst.obs.lsst.LsstComCam --register-dataset-types --output-run ts\_phosim\_9006001 -p comcamPipeline.yaml -d “exposure IN (4021123106001, 4021123106002)” -j 2 In RSP notebook i get the following error: [Errno 2] No such file or directory: ‘pipetask run -b /project/gmegias/aos/lsst\_stack/perturbations/test/phosimData -i re…
