# Task not able to run, got an attribute error while assigning opacity value. Please help!

**URL:** <https://discourse.psychopy.org/t/task-not-able-to-run-got-an-attribute-error-while-assigning-opacity-value-please-help/7905>\
**Category:** Builder\
**Created:** [May 24, 2019, 9:13am UTC](https://discourse.psychopy.org/t/task-not-able-to-run-got-an-attribute-error-while-assigning-opacity-value-please-help/7905 "2019-05-24T09:13:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darshan\_H.S](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/darshan_h.s/32/4761_2.png) [@Darshan\_H.S](https://discourse.psychopy.org/u/Darshan_H.S)\
**Post date:** [May 24, 2019, 9:13am UTC](https://discourse.psychopy.org/t/task-not-able-to-run-got-an-attribute-error-while-assigning-opacity-value-please-help/7905/1 "2019-05-24T09:13:39Z")

</div>

windows 7\*\*  
PsychoPy version 1.83  
Im trying to develop a task where there will be a background grid of four rectangle boxes, an image will appear in one of the rectangular box. When i have set 4 images for each of the boxes and inserted condition for the experiment trials. As i said outo f 4 images, one image has to appear. So i marked $ with a target image file name in the opacity option. But in the runtime. It is showing an error, object has no attribute (setOpacity).

Please help me, Thank you in advance

![error](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/4/e41b3041734ef620efabf566bb5ddebb605f33eb.png)

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [May 24, 2019, 10:27am UTC](https://discourse.psychopy.org/t/task-not-able-to-run-got-an-attribute-error-while-assigning-opacity-value-please-help/7905/2 "2019-05-24T10:27:06Z")

</div>

The error suggests you are trying to set the opacity of a number (int), rather than an image stim. Will need to see the relevant code or Builder file to see what is happening.
