Pavlovia issue, task error

URL of experiment: firstpartproject [PsychoPy] (pavlovia.org)

Description of the problem: This is the error message I am receiving. The loop for this routine contains the excel spreadsheet.

It works completely fine in the builder.

I fixed the above issue and now I am seeing a different error, which can be viewed when clicking on the URL of the task

taskone [PsychoPy] (pavlovia.org)

Hello,

check the crib sheet by @wakecarter.

Best wishes Jens

Hello,

Thanks Jen. Yes I have been referring to it.

Best wishes

Hello,

the error your program throws points to an auto-translation problem that requires manual editing.

Best wishes Jens

1 Like

Hello,

Can I manually edit the JS script and then sync it with the project on Pavlovia? Also, I think the button function is causing the issue and the excel sheets containing the questions and parameters for the form component. I also used a slider.

Hello,

You are right, PsychoPy will compile new JavaScript code each time you synchronise with Pavlovia. The trick is to use a JS-only code component or a Both code component. In these cases, PsychoPy will include the JS part of the code component without overwriting it by automatically translating PsychoPY to PsychoJS. I usually leave the auto-translation feature on until the very end. I then set the code component to Both or *JS only, copy & paste the auto-translated JS into that code component, and then make the necessary edits.

Post the error messages here. Don’t let us guess.

Best wishes Jens

1 Like

Hi,

Thank you for your message. The code I included doesn’t appear to me the issue. When I check the issue through the console log this section appears to be causing the issue, please see below.

async function updateInfo()
expInfo[‘date’] = util.MonotonicClock.getDateStr()
expInfo[‘drl’] = expName;
expInfo[‘psychopyVersion’] = ‘2022.2.5’;
expInfo[‘OS’] = window.navigator.platform;

psychoJS.experiment.dataFileName = (“drl”) + `data/${expInfo[“participant”]}${expName}${expInfo[“date”]} );

I did not write this code, It was automatically produced when I exported the HTML

here is the link to the experiment. drl [PsychoPy]

Hi,

Here is a photograph showing the error in line 3087. I have deleted it and synced the project on several occasions but it still keeps re-appearing.

This is the code.
// Redirect to Qualtrics end-of-survey page
window.location.href = https://www.youtube.com

And, it isn’t code that I manually included

drl.js · master · Zelal Gulbahce / drl · GitLab (pavlovia.org)

Also, currentloop is not defined appears to be causing the error.

Hello Zelal

You are using a more recent version than I am. But I noticed that your feedback routines 2 and 3 count keyboard_components that do not exist. Rename the keyboard-components in ExpBlock2 and ExpBlock3 to the ones mentioned in your code.

This is written by the Builder. It is basically the information from the info-screen which is shown at experiment start.

This comes from the digits code component in the End Experiment tab of the digitsTrials-routine. After deleting this, your experiment compiled without error messages to JavaScript.

You have quite a few routines that you are not using in this experiment. You may want to consider deleting them if they don’t serve any purpose in the experiment.

Also, your trials1, trials2, trials3 loops look the same, you might want to consider combining them into one routine that is looped over. This will make debugging easier.

Best wishes Jens