# Pause code is not working and no error message displayed

**URL:** <https://discourse.psychopy.org/t/pause-code-is-not-working-and-no-error-message-displayed/20960>\
**Category:** Online experiments\
**Created:** [March 3, 2021, 7:26pm UTC](https://discourse.psychopy.org/t/pause-code-is-not-working-and-no-error-message-displayed/20960 "2021-03-03T19:26:42Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [March 4, 2021, 6:10pm UTC](https://discourse.psychopy.org/t/pause-code-is-not-working-and-no-error-message-displayed/20960/4 "2021-03-04T18:10:46Z")

</div>

> [@Randomizing image without repeating in blocks?](https://discourse.psychopy.org/t/randomizing-image-without-repeating-in-blocks/20428/4):
>
> Is the only difference a question in a text component? If so I would add a loop counter in Begin Experiment (loopIdx=0) add one to it each loop (loopIdx+=1) Then change the text component when loopIdx=10 text\_1.text=‘new question ‘ Previously I would have used .thisN to count the loops but I’ve stopped using it because it has stopped working online

> [@20 trials among the 150 rows in Excel](https://discourse.psychopy.org/t/20-trials-among-the-150-rows-in-excel/18937/2):
>
> Since trials.thisN doesn’t work any more, you could set trialIdx=0 in a Begin Experiment code component tab and then add the following to the End Routine tab. trialIdx+=1 if trialIdx == 20: currentLoop.finished=True

---

_[View the full topic](https://discourse.psychopy.org/t/pause-code-is-not-working-and-no-error-message-displayed/20960)._
