How to assign a new ID to each participant?

Hi @wakecarter,

I’ve tried deleting and making a new project a few times, still no luck. I tried making the experiment in PsychoPy without any of the counterbalancing stuff, I got it to run locally, to run online, and to run online with your participant counter url even tho it’s not needed in that version. It generated a .js file, so all was working ok. As this looked like the best lead in a while, I added the counterbalancing stuff to this version of the experiment, synced it to the new project, but again it didn’t update the .js file so was just running the non-counterbalancing version. I am stumped. It seems like there’s something about adding the counterbalancing things in that stops the .js file from being updated…

Lydia

@wakecarter thank you for your app, really helpful! I was wondering how to reset the participant number back to 1 now I have trialled it a few times?

That can only be done manually by me deleting rows from the database. There’s no need for you to start your participants at 1. If you really want to, perhaps you could “buy me a coffee” :wink:

Ah Ok, thank you. I need to be able to start from 1 because I use unique conditions files taken from the participant number, and want to start from conditions file 1 when I do the real experiment. Happy to buy you a coffee for your help :slight_smile:

Please could you PM me the link you’re using so I know which lines to delete?

1 Like

thank you!

1 Like

Hi @wakecarter and @jon

It still can’t update the .js file, or if I delete everything and start again, it won’t make a js file. I’ve been banging my head against this wall for weeks, any ideas of anything I could try?

Thank you for your help,

Lydia

If you add me (Wake) as a developer to your project I can take a look. However, if you are pressing the sync button and getting a green globe then I’m sure the is file is updating. Perhaps you have have js files in two locations.

Hi @wakecarter and @jon ,

I used jspsych to make my experiment and wakecarter’s generator for my participant ID (https://moryscarter.com/vespr/pavlovia.php?folder=FranckElisabeth&experiment=crm-nback-condition_2/) and it works perfectly for that task. My problem appear when I try to use the id (or researcher) field and it would be very useful for me to send links with id=1, 2 or 3 to select the correct condition.json I made. As explained I needed to add a ‘/’ at the end because I don’t have html directory but when I try to add &id=number in the link, this solution no longer work because it adds the /html/ part in the url. I though “no problem I will make a html repository and place my index.html in there” so I tried. In that case the redirection is okay but now it’s the pavlovia plugin which doesn’t work anymore because the config.json seems not to be in the same folder as my index.html. I tried to deactivate and reactivate my experiment thinking it would generate a new “config.json” but it seems to be more complicated. The only experiments I see with that html folder are the ones made with PsychoPy but I can’t identify what I miss to make it works well.

Can you help me ?

I suspect that you added the / at the end when it needed to be straight after the experiment name

I didn’t realize that the order was important!
As you suspected I tried “https://moryscarter.com/vespr/pavlovia.php?folder=FranckElisabeth&experiment=crm-nback-condition_2&id=2/” whereas I had to do “https://moryscarter.com/vespr/pavlovia.php?folder=FranckElisabeth&id=2&experiment=crm-nback-condition_2/”.

Thank you for this really quick answer, It works perfectly now!

It’s not so much that the order is important, it’s that the slash is part of the experiment name.

Hi @wakecarter,

I’ve added you to the project (online_face_exp). Thank you very much for you help.

Lydia

Did you change the name of your experiment file?

I’d recommend that you delete your local .git folder and resync to a new project.

In my various attempts to make it work I’ve changed the file name, deleted it and started again, deleted the project and made a new one etc.

I’m not sure what a local .git folder is (bit of a newbie to all of this!). I can’t see a file or folder called or ending in git on my laptop. In the pavlovia gitlab project I have a file called .gitignore - is that what I should delete?

On Windows in Windows Explorer you can go to Options → Change folder and search options → View → Show hidden files, folders and drives.

The local .git folder is hidden by default and contains the information about the connection to the project online.

I’m on Mac and found how to show hidden files. I deleted the .git folder and synced and made a new project, but still no .js file created. I added you to the new project too (face_exp_hadhelp).

I downloaded your project and pressed the sync button and now you have a JS file.

Hello,
Thank you so much for that, I can now see there is a js file! I ran the experiment online using http://moryscarter.com/vespr/pavlovia.php?folder=lydiabrown&experiment=face_exp_hadhelp/ and it almost worked. The experiment actually started and ran which is a great step, but the counterbalancing using the participant counter url and the code component didn’t work, it ran both counterbalancing conditions rather than just 1. I also realised it hadn’t created a data folder, so I made one and tried to sync it and it won’t let me, I get the following error message saying the gitlab ID has changed and there is no .js file:

262.7090 WARNING Project lydiabrown/online_face_exp has changed gitlab ID since last use (was 118796 now 125133)
Generating PsychoJS script…

Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 772, in findPathsInFile
File “”, line 1, in
NameError: name ‘group’ is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 74, in generateScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 245, in compileScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/scripts/psyexpCompile.py”, line 217, in _makeTarget
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 210, in writeScript
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/flow.py”, line 277, in writeFlowSchedulerJS
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 819, in getResourceFiles
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/experiment/_experiment.py”, line 781, in findPathsInFile
NotADirectoryError: [Errno 20] Not a directory: ‘/Users/lydiabrown/Documents/local/online_exp_updated.js’

Pulling changes from remote…
Already up to date.
done
Pushing changes from remote…
done
Successful sync at: 11:57:33, took 0.902s508.3961 INFO Successful sync at: 11:57:33, took 0.902s

Hi @wakecarter ,

I think it’s still the same problem that I can’t make changes and update the js file…? I made a little change to the text just to see if I could update it and as shown below it updates the .psyexp file but not the js files.