Qualtrics to Psychopy back to Qualtrics

I don’t know a way of changing the settings for PsychoPy components, but it’s easy enough to save an extra column in milliseconds.


The -500 in my previous code was use to a .5 second fixation at the start of the routine.

Unfortunately when I add the code in the beginning and change the key_resp appropriately, it won’t run and generates this error code:
AttributeError: ‘Mouse’ object has no attribute ‘rt’

Experiment ended.

This is the same for when I insert this code:
thisExp.addData(‘StimuliResp.RT in ms’, StimuliResp.rt * 1000)

with the stimuliresp altered as needed. I got this from this forum How can I measure reaction time in milliseconds?

Any ideas?

Have a look at this thread for mouse reaction time code.


Would I include that code as well as the other codes mentioned above? Or just that one?

I added that code in and it is recording in milliseconds, hurray, thank you! Now the question is how to add coding to specifically average 12 T to 31 T on the excel document to transfer in the custom URL to Qualtrics (the “Main” reaction time task, where as the smaller data collection is the practice loop).

I have attached the excel document so you can see what I mean as well as a screenshot of the psychopy builder.

_simpleRTT_2022_Mar_16_1407.csv (5.8 KB)

Ive tried to add some coding to generate an average from the mainTrials specific loop, but it keeps coming up with an error stating that mainTrails is not defined. I have had a look at the other forums, but I am still not sure why this error code is appearing. Here is my code, with the new average reaction time code starting at ART.

if mouse.isPressedIn(targ): # target is the name of the object to click on
rt = round(t*1000) # t is seconds since the start of the routine
continueRoutine = False

 ART = mainTrials.data['ART.ART'].mean() 
 thisExp.addData('ART', art)

Any suggestions? I have also attached a screenshot of the specific mainTrials loop that I am wanting to record the average reaction times for.

Sorry for all the questions! Thank you.

I am still stuck on this and cannot seem to get it resolved. I need to start collecting data as soon as possible as I am conscious of the time left to do so. Any help would be much appreciated.

Sorry, but I’ve never tried to access the data of a specific loop. I append data to a list if I want to save it for later and then compute from that list.

How would that work here? Do you know of anyone who can pull the data from a specific loop? I did see a forum post from it, and thats where i got the coding from, but unfortunetly it has not worked for me.

I have managed to create code for average reaction time data pull successfully. Now, when I upload to pavlovia, it is stating that it is not able to load the resources, even though they appear to be pathed correctly and work locally. Furthermore, I am unable to change the JS code, aka, when i make a change, press save, go back to the builder and look at the code again, my changes are gone.

Any ideas? The time frame is getting tight now for data collection, and very stressful.


Try this link for information about resources.


Are you editing the JS code directly rather than in Builder?

I am trying to edit the code through the compile JS Script in builder. By “in Builder” do you mean a code component?

The link doesnt explain why I am getting these errors, nor how to fix them.

I can upload my experiment files here if you would prefer, so you can upload to pavlovia and take a look?

I have a couple of consultancy projects that I need to prioritise when on my laptop, so most of the support I’m giving on the forum at the moment is on my phone.

All edits to experiments you want to run online should be made in Builder (so code edits should be in code components).

It sounds like you haven’t yet found my crib sheet. Search the forum for a link.

I have found your crib sheet but I am still unable to rectify these issues.
I am using the Online tab in the builder to add the resources
I am on version 2022.1.2 therefore I should not need an html folder anymore right?
If so, why does it still create one?
When trying to change the .js in the coder that opens when we upload to pavlovia to manually load the resources using code , we get an error when syncing to pavlovia.

If you have an html folder then you need to create a new repository with Experiment Settings/ Online Output folder blank.

There is a post I usually link to at this point. I’ll go looking for it again.

What fixed it in the end was:
we deleted the html folder
the JS and py code files
set the resources in online tab with output set to blank (not html)
let psychopy create new codes
and now it works, huraay!

Once everything is up and running, ill post a detailed post of all the issues faced and how they were fixed for other people to see too.

Thank you!

Hello @pavle , May I ask for your assistance as well? I am doing a study in which I have to transfer unique IDs from QUaltrics → Pavlovia → Qualtrics. I am new to custom URLs and embedded data as well!

Have you watched my daisy chaining video?

I have managed to do this to some degree! Send me a message if you would like some help and i will walk you through it.