# Issue with giving feedback-first correct feedback marked wrong

**URL:** <https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613>\
**Category:** Online experiments\
**Created:** [June 28, 2020, 5:01pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613 "2020-06-28T17:01:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiushan\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/qiushan_liu/32/6782_2.png) [@Qiushan\_Liu](https://discourse.psychopy.org/u/Qiushan_Liu)\
**Post date:** [June 28, 2020, 5:01pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/1 "2020-06-28T17:01:38Z")

</div>

URL of experiment:

> **[Qiushan Liu / Interleaved V2](https://gitlab.pavlovia.org/qiushan.liu/interleaved-v2)**
>
> Sign In/Register

Description of the problem:  
I used the following code to set up a feedback routine for one of my task.

 ![Screen Shot 2020-06-28 at 12.59.12 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/f/8f607993475f147bedb34c2234e91e80c6c25343.png)

The task consists of many trials and I realized that it appears that for the first accurate keypress, the message displayed always appears to be “Oops, that’s wrong!” and I don’t know how to fix it. Additionally, it appears that after an inaccurate response, once I get back to the accurate response, the problem will appear again.

I checked my excel file when I ran locally, it appears that the key response was marked as correct but the message being shown claims that it was wrong. I am not sure what I am doing wrong here.

Any suggestion?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 28, 2020, 5:24pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/2 "2020-06-28T17:24:12Z")

</div>

Where is this code in relation to the keyboard and the text component?

---

<div class="post-metadata">

**Author:** ![Qiushan\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/qiushan_liu/32/6782_2.png) [@Qiushan\_Liu](https://discourse.psychopy.org/u/Qiushan_Liu)\
**Post date:** [June 28, 2020, 5:28pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/3 "2020-06-28T17:28:16Z")

</div>

![Screen Shot 2020-06-28 at 1.26.04 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/e/4e3c2f84b4582cf7698e091e593478174886d48e.png)

 ![Screen Shot 2020-06-28 at 1.25.07 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/0/60e30fbb46cbcb3351e346f9af153899dd963487.png) ![Screen Shot 2020-06-28 at 1.26.35 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/3/c3d1b1d12b1d5044805a16ff6bd94b4c590b17de.png)  
I set up my routine such that the DC\_T routine contains the keyboard component, followed by a timed feedback component with the text. The test component is set up to show $msg.

---

<div class="post-metadata">

**Author:** ![Qiushan\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/qiushan_liu/32/6782_2.png) [@Qiushan\_Liu](https://discourse.psychopy.org/u/Qiushan_Liu)\
**Post date:** [June 28, 2020, 5:36pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/4 "2020-06-28T17:36:48Z")

</div>

I also put the code in the begin routine section. with the msg = ‘’ in the begin experiment section

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 28, 2020, 5:37pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/5 "2020-06-28T17:37:29Z")

</div>

Begin Routine of DC\_fb ?

Is it above the text component?

---

<div class="post-metadata">

**Author:** ![Qiushan\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/qiushan_liu/32/6782_2.png) [@Qiushan\_Liu](https://discourse.psychopy.org/u/Qiushan_Liu)\
**Post date:** [June 28, 2020, 5:39pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/6 "2020-06-28T17:39:33Z")

</div>

The code component is below right now, should i move it to the top?

 ![Screen Shot 2020-06-28 at 1.39.13 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/d/4de04b1b1f0ee3104b2c7a743c63f756c1186859.png)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 28, 2020, 5:40pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/7 "2020-06-28T17:40:16Z")

</div>

Yes – at the moment it’s running after msg is assigned

---

<div class="post-metadata">

**Author:** ![Qiushan\_Liu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/qiushan_liu/32/6782_2.png) [@Qiushan\_Liu](https://discourse.psychopy.org/u/Qiushan_Liu)\
**Post date:** [June 28, 2020, 5:41pm UTC](https://discourse.psychopy.org/t/issue-with-giving-feedback-first-correct-feedback-marked-wrong/14613/8 "2020-06-28T17:41:02Z")

</div>

It worked! I did not know that the presentation order matters! Thank you so much for your help!
