# ConstructDark.py raises AttributeError

**URL:** <https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074>\
**Category:** Support\
**Tags:** hsc, calibration, darkframe\
**Created:** [July 12, 2017, 8:44pm UTC](https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074 "2017-07-12T20:44:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vera](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Vera](https://www.rubin.community/u/Vera)\
**Post date:** [July 12, 2017, 8:44pm UTC](https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074/1 "2017-07-12T20:44:07Z")

</div>

Hello,

I am quite new here in this community and please forgive my ignorance.

I am running the processing on HSC data. As I tried to construct the calibration file just as what show here: [Running the stack on HSC data for a DESC PSF project](http://www.rubin.community/t/running-the-stack-on-hsc-data-for-a-desc-psf-project/964), as I typed:

```
constructDark.py input --calib CALIB --rerun output --id visit=007802..007806:2 --calibId calibDate="2014-09-24" --job dark --cores 16 --batch-type=smp

```

while input is the data repository contains `_mapper`. The error comes out as:

```
WARN dark: Unable to process DataId(initialdata={'taiObs': '2014-09-24', u'pointing': 997, 'visit': 7806, u'dateObs': '2014-09-24', u'filter': 'HSC-I', u'field': 'ABELL2319', u'ccd': 99, 'expTime': 240.0}, tag=set([])): 'lsst.afw.image.mask.mask.MaskU' object has no attribute 'convertU'
AttributeError on ghk1:11033 in run: 'lsst.afw.image.mask.mask.MaskU' object has no attribute 'convertU'
Traceback (most recent call last):
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 113, in wrapper
    return func(*args, **kwargs)
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 1067, in run
    while not menu[command]():
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 237, in wrapper
    return func(*args, **kwargs)
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 1085, in reduce
    result = self._processQueue(context, func, [(index, data)], *args, **kwargs)[0]
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 544, in _processQueue
    return self._reduceQueue(context, None, func, queue, *args, **kwargs)
  File "/../lsstsw/stack/Linux64/ctrl_pool/13.0-2-gb1fa231+3/python/lsst/ctrl/pool/pool.py", line 570, in _reduceQueue
    resultList = [func(self._getCache(context, i), data, *args, **kwargs) for i, data in queue]
  File "/../lsstsw/stack/Linux64/pipe_drivers/13.0-3-gfcfef02+7/python/lsst/pipe/drivers/constructCalibs.py", line 508, in process
    exposure = self.processSingle(sensorRef)
  File "/../lsstsw/stack/Linux64/pipe_drivers/13.0-3-gfcfef02+7/python/lsst/pipe/drivers/constructCalibs.py", line 769, in processSingle
    mask.convertU(), afwDet.Threshold(0.5))
AttributeError: 'lsst.afw.image.mask.mask.MaskU' object has no attribute 'convertU'
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 9

```

I guess I may be giving it the wrong input data? But I cannot figure out which directory should I give as the input instead. Any answer or discussion would be appreciate with many thanks.

Thanks,  
Vera

---

<div class="post-metadata">

**Author:** ![natelust](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/natelust/32/358_2.png) [@natelust](https://www.rubin.community/u/natelust)\
**Post date:** [July 12, 2017, 9:04pm UTC](https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074/2 "2017-07-12T21:04:02Z")

</div>

Thank you for posting your question here. This bug has already been fixed in a more recent version of pipe\_drivers. Do you need help getting a new version of pipe\_drivers setup, and if so how did you install your LSST software stack?

---

<div class="post-metadata">

**Author:** ![Vera](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Vera](https://www.rubin.community/u/Vera)\
**Post date:** [July 12, 2017, 9:24pm UTC](https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074/3 "2017-07-12T21:24:17Z")

</div>

Thank you for helping.  
I guess declaring the newest version to eups will do?  
The installation is with lsstws and lsst-build. The current version of pipe\_drivers is `13.0-3-gfcfef02+7`.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [July 12, 2017, 9:27pm UTC](https://www.rubin.community/t/constructdark-py-raises-attributeerror/2074/4 "2017-07-12T21:27:42Z")

</div>

I suggest installing the latest weekly build.
