| Reference | Downloads | Github

Cannot exit Double loop in online Pavlovia (Using JS code component)

Description of the problem:

My experiment has a double loop design. It works well offline. But when I upload it to pavlovia.
The external loop will not end when the experiment meets the ending condition.
Look like this picture:

The foreshow_text will load well. But the loop in the online experiment would not end.

Actually, I use the conditonLoop.finished = True before, It worked well. I thought the problem may come from a double loop.

I have read the answers in the forum.

Two methods were used to fix this problem:

  1. Return to the old version 2020.1
  2. use trails.finished == True. But this method did not work in the latest version. My psychopy version is 2021.2.0.

I’m here for help with the non-returnable version。

I found the reason. The double loop is not the cause. Because In JS, the logical judging for “1.000 == 1” is False. This is the reason the loop didn’t end. Jesus! A bit of a silly mistake, but too hard for python users to notice.

1 Like

Do you need to delete your other post?

I already have done.