# Feedback code component 'syntax error'

**URL:** <https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630>\
**Category:** Coding\
**Tags:** feedback, syntaxerror\
**Created:** [June 29, 2020, 10:40am UTC](https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630 "2020-06-29T10:40:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.bassoon](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@s.bassoon](https://discourse.psychopy.org/u/s.bassoon)\
**Post date:** [June 29, 2020, 10:40am UTC](https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630/1 "2020-06-29T10:40:17Z")

</div>

I am running PsyhcoPy 2020, windows 10. I have a routine for presenting an audio stimulus, followed by a routine for providing feedback on whether the participant is correct and their response time:

 ![feeback1](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/a/5/a5c59d7180af723efb681708584e6db275ce1bd8.png)

However, the code component inidcates a syntax error:

 ![feedback2](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/d/4d9d46e28812f3c74cb9524f16664b9442fd1095.png)

I’ve copied this code from when i ran this experiment in a previous version of PsychoPy, and originally adapted it from a forum, possibly this one. I am new to Python though, so I’m not really sure where the syntax error is?

---

<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 29, 2020, 11:16am UTC](https://discourse.psychopy.org/t/feedback-code-component-syntax-error/14630/2 "2020-06-29T11:16:16Z")

</div>

You can’t use that form of string formatting if you want the auto translate to work. You need to use

msg="Correct! Response Time = "+str(round(PresentStimkey.rt,3))

were you have previously defined round in code\_JS as per my crib sheet (see pinned post in online)

If you don’t want to use the experiment online you can ignore the Javascript syntax error.
