Forum Replies Created
-
AuthorPosts
-
Jeremy
KeymasterYou are not properly closing your
newTrial
andTemplate
commands: you need to add two closing parentheses after line 56 of your file Phase 3.js, as hinted at by the message that appears when you move your cursor over the red cross signaling an error:You can see short error messages about those issues in the text editor on your project’s page, if you move your cursor over the red X icons that appear to the left of the line numbers
Jeremy
Jeremy
KeymasterHello,
Yes, the servers still experience important delays in generating the results files. This is due to multiple factors. The attack monopolized the available resources, and many operations were put on hold, and some are still ongoing at present.
There also are new operations added to the queue every day, including, notably, requests to save important incoming data (sometimes of thousands of lines) which take priority over other operations, but also requests to generate results files, which also use up a good amount of memory.
I seem to notice several requests for results files within less than a second. Users of the farm who fail to get their results or get them very slowly should refrain from clicking multiple times on the Download button(s), of from refreshing the page repeatedly and requesting the results again. All the requests are being received, even if they take time: unfortunately, sending multiple requests will only slow down everything, and you will get your results with an even greater delayFinally, possibly as a result of the original Ibex farm going down and of the recent attack, our database has now grown significantly. Because of the great amount of results lines in the database, accessing them takes a longer time (incidentally, this is why users receive notifications inviting them to regularly clear their results files from our servers)
Note that, as I am writing this message, the servers are not currently experience slowdowns, but you can expect slowdown episodes to occur again in the near future. I apologize for the inconvenience
Jeremy
Jeremy
KeymasterHello,
Thank you for your messages. We are aware of the situation. Our servers have been undergoing a DDoS flooding attack for the past few hours (which should be under control now), resulting in delayed processing of requests to save and generate results files. Those requests are currently lagging by approximately 1h30min: if one of your participants completed your study 1h30min ago, their results are being added to our database now. Participants who completed your study more recently will have their results added to our database within the next 1h30min, assuming delays do not accumulate: incoming data are still being processed and should be eventually saved in our database, but with important delays. Your participants may see a confirmation message that their results have been sent to the server, which means that they have been successfully queued for processing, however, the confirmation message does not indicate that the results have been added to our database yet
Please refrain from attempting to accessing your results for now, as each request (whether ultimately successful or not) is likely to incur additional memory load on our servers. You should be able to access your results again within the next 24h
We apologize for the inconvenience
Jeremy
Jeremy
KeymasterHi Elias,
You never
print
the TextInput element so it won’t appear on the page. Your script gets stuck on itswait
command because, the element not being displayed on the page, you cannot press Enter to validate it.I suspect that what you want is:
newTimer("allotted time", 6000).start() , newTextInput("feedback", "Enter your answer") .log() .lines(0) .size(400, 200) .print() .callback( getTimer("allotted time").stop() ) , getTimer("allotted time").wait() , getText("word").remove() // Take the word off the page , getTextInput("feedback") .remove() // .wait( getTextInput("feedback").test.text(/^.+[\r\n].+[\r\n].+$/) ) .test.text( row.CorrectKey ) .success( newText("Good job!").print() ) .failure( newText("Wrong anwser!").print() ) , newTimer(2000).start().wait() // Wait 2s on the empty page
Jeremy
October 7, 2021 at 4:53 pm in reply to: Error preventing participants from starting experiment #7358Jeremy
KeymasterHi,
Did you invite them to apply this solution? https://www.skillsgarage.net/kb/error-notallowederror-permission-denied/
Jeremy
Jeremy
KeymasterHi,
I was able to run (a copy of) your experiment on Safari on an iPhone, but I used the
AddHost
method and needed to add a Button andwait
for a click on it beforeplay
ing the Audio element. The images load fine, but becauseplay
crashes in the absence of a Button element, the script would never get to theirprint
commands, which is why you didn’t see themAnother issue (at least with the
AddHost
method) is that you don’t have a file named008vismeghvitkanin.wav
: you file is named008vismeghvitkanin.m4a
(different extension—I didn’t check the actual audio format of the file)Did you say you tried Chrome on your iPad too? Did it also block playback the same way?
Jeremy
Jeremy
KeymasterHi,
If the
AddHost
method works for everything but the Ipad, I would just go with it. It also means that the problem is not coming from where the files are retrieved from (given that they are successfully fetched on PC and Mac) so switching to using a zip file is unlikely to solve the Ipad issue.Unfortunately I don’t have access to an Ipad myself, so I cannot test your project to troubleshoot this problem. What happens exactly on the Ipad? Do you get a preloading message, and when you start the trial, you have blank spaces instead of images, and no audio playback?
Re. the zip issue, you need to set the CORS properly. I see on your private server that you have a file named
.htaccess.txt
, but it needs to be named.htaccess
, without the.txt
extension (documentation page, step 1: “If your editor or operating system does not allow you to give this name to your file, name it htaccess.txt: you will rename it later after uploading it on your server”; step 4: “If you could not use this filename before (due to your operating system’s settings for instance) rename your file .htaccess.”)The AWS console has an option to set up CORS for your S3 bucket, you need to allow GET requests for https://farm.pcibex.net
Jeremy
Jeremy
KeymasterHi,
I had to restart that farm some time ago, which is why the message disappeared. The farm at https://expt.pcibex.net/ is still scheduled to shut down in January 2022
Jeremy
October 5, 2021 at 3:05 pm in reply to: Having participants select more than one option in questions #7349Jeremy
KeymasterIf all you want to do is print a line of text, you should probably consider using a Text element (as in
newText("Which one?").print()
)If you haven’t read the PCIbex tutorial yet, I invite you to do so, it’ll give you a general idea of how to do this kind of things: https://doc.pcibex.net/basic-tutorial/
You can use the
vertical
command to display the options top-to-bottom: https://doc.pcibex.net/scale/#scale-verticalJeremy
October 5, 2021 at 1:30 pm in reply to: Having participants select more than one option in questions #7347Jeremy
KeymasterHi,
There is a not-yet-documented command on Scale elements called
checkbox
which turns the options into checkoxes that can all independently be on/off. By default each option will appear as a label next to a checkbox, but you can use CSS rules to customize the rendering. For example, if you want to only keep the text labels and have a dotted frame appear around the selected options, you can add this to global_main.css:.PennController-Scale .option { margin: 1em; } .PennController-Scale .option input[type="checkbox"] { display: none; } .PennController-Scale .option input[type="checkbox"] + label { border: medium dotted transparent; padding: 0.25em; } .PennController-Scale .option input[type="checkbox"]:checked + label { border-color: black; }
Example trial for reference:
newTrial( newScale("answer", "hello", "world") .checkbox() .print() , newButton("Hello world") .print() .wait() )
Jeremy
October 4, 2021 at 11:14 am in reply to: Accuracy for selector with a template and putting a "pause" between trials #7345Jeremy
KeymasterHi Lorrainy,
1) The command
selector.test.selected
takes a reference to an element as its argument, not just the element’s name: https://doc.pcibex.net/selector/selector-test-selected/Your code should be:
getSelector ("fraseT2") .test.selected( getText(row.acuracia) ) .success( getVar("acuracia").set(1) ) .failure( getVar("acuracia").set(0) )
(The next line
.log("acuracia" , getVar("acuracia"))
has no effect, since you already calllog
on that Selector element when you create it—you seem to be trying to usenewTrial().log
here, so you should move that line on the closing parenthesis ofnewTrial
, which actually comes immediately on the next line in your code)2) This
rshuffle("tarefa2Alvo", "tarefa2Distratoras")
outputs a sequence of shuffled trials labeledtarefa2Alvo
ortarefa2Distratoras
, and adding,"transiTarefa2"
just after it will simply run any trial labeledtransiTarefa2
after that sequenceThe function you are looking for is
sepWith( separator , subsequence )
, in your case you want to usesepWith( "tarefa2Distratoras" , rshuffle("tarefa2Alvo","tarefa2Distratoras") )
3) In your code you first attempt to add a Button element named botao8
before
the Button element named botao7, but you reference that Button element (getButton("botao8")
) before you even create it, so nothing effectively gets added to the left of botoa7. Even if it did, youprint
botao8 again just after that, so it will necessarily end up below botoa7, centered on the pageWhat you want is:
newButton("botao7", "Voltar") .callback(jump("pratica1"),end()) .before( newButton("botao8", "Seguir") ) .css("margin-left","1em") .print() , getButton("botao8").wait()
Jeremy
Jeremy
KeymasterDear Casey,
Some things you can do:
– if you don’t need the starting and ending time of your Header trials, add
.noTrialLog()
after the closing parenthesis of yourHeader(...)
(before or after.log(...)
, it shouldn’t matter)– more generally, if you don’t need the starting and ending time of some trial, add
.noTrialLog()
after the closing parenthesis of its correspondingnewTrial(...)
command– if you are not interested in the participants’ answers to the practice trials, consider remove the
.log(...)
commands on the elements included in those trials (Key elements, TextInput elements, etc.)– for your Textnput elements, you may want to consider using
.log("final")
so as to only get the “Final” line, and not the “first” and “validate” ones– you may or may not want to delete some of the
.log
commands on your Key elements, depending on how crucial it is for response time calculations to have lines reporting those keypresses in your results fileMost importantly, make sure to take one or several testruns after editing your project to verify the integrity of the results files it produces, and apply the analyses you would normally apply so you’re sure you’re not missing any crucial bit of information
Jeremy
Jeremy
KeymasterHi Elias,
As you can see in the Errors tab of the Debug window, your column is named
CorrectKey
and notCorrectKey
(note the space character at the beginning)You should have a
wait
command before yourtest.text
, because otherwise the script will rush through the lines even before the participant has had time to type anything in the box, so the test will necessarily fail (because the box is initially empty). Also note that theCorrectKey
cells in your CSV table that do have some text in them all start with a space character, and the third one additionally ends with a space characters: those matter, and unless your participant types space characters in the box at the exact same place, the test will fail too; you probably want to remove those space characters from the cellsOnce you fix those issues, you should get something functional and close to what you want
Jeremy
Jeremy
KeymasterSee this message
Jeremy
KeymasterHi Juliana,
Your code seems fine, as far as I can tell (the lines
PennController.SendResults
won’t have any effect because there’s no()
but that doesn’t matter since you haveSendResults()
directly in yourSequence
)Do you know if the participants took your experiment at a specific time? With a specific browser? From a specific region?
Also, how many lines do you have in your results file? The PCIbex Farm will stop serving data after 100K lines of results, so if you have more than that you will need to collect your results file in multiple times
Jeremy
-
AuthorPosts