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’
This is the same for when I insert this code:
thisExp.addData(‘StimuliResp.RT in ms’, StimuliResp.rt * 1000)
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.
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()
Any suggestions? I have also attached a screenshot of the specific mainTrials loop that I am wanting to record the average reaction times for.
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.
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.
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.
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!