Forum Replies Created
-
AuthorPosts
-
grusha.prasadParticipant
Oops I figured it out — my CSV file was not structured correctly. Apologies!
grusha.prasadParticipantHi all,
I am working on something similar, but when I use the syntax Jeremy suggested, the statement always evaluates to the else condition. Here is my code and the first few rows of my csv file. Can anyone spot where I am going wrong? For example even when I change the “yes” to “no” only the else statement gets evaluated. This makes me think that my conditional checking is wrong somehow but I can’t spot it.
Thank you!
Grusha.( row.truncated=="yes" ? [ newText("instructions", "<b>Re-type the partial sentence in the prompt and complete it.</b>") .settings.center() .settings.css("font-size", "medium") .print() ] : [ newText("instructions", "<b>Re-type the full sentence in the prompt.</b>") .settings.center() .settings.css("font-size", "medium") .print() ] )
Group,sent_type,struc,prime_type,verb,verb_num,sent_id,sentence,question,response,truncated list_1A,prime,rrc,NA,recorded,1,recorded1,The priest recorded by the mob preached against violence.,no list_1A,prime,rrc,NA,recorded,2,recorded2,The management recorded by the employee talked about the importance of privacy.,no list_1A,prime,rrc,NA,recorded,3,recorded3,The dancer recorded by his trainer practiced energetically.,no list_1A,target,rrc,rrc,recorded,4,recorded4,The influencer recorded,yes list_1A,prime,urc,NA,loved,1,loved1,The landlord who was loved by his tenants was very considerate.,no list_1A,prime,urc,NA,loved,2,loved2,The comedian who was loved by the audience impersonated a famous celebrity.,no list_1A,prime,urc,NA,loved,3,loved3,The kid who was loved by her parents went to bed with a smile.,no list_1A,target,rrc,urc,loved,4,loved4,The janitor loved,yes
- This reply was modified 2 years, 1 month ago by grusha.prasad.
grusha.prasadParticipantThank you so much for the quick and helpful response! Just a note in case someone sees this in the future: I had to replace
"\s+\w+"
with"\\s+\\w+"
. But once I did that, this worked perfectly.grusha.prasadParticipantThanks for looking into this! .ogg files are slightly preferable to .mp3 for our experiment, but preloading all the files is also desirable. Just to clarify: By using CheckPreloaded() I can still make sure that all the files are pre-loaded before the experiment begins even if I am not using the zipped archive right? (i.e. I set add the host and access the individual files from the server)
grusha.prasadParticipantI just uploaded the MP3 zip file (https://consonant-perception-exp1.s3.us-east-2.amazonaws.com/mp3_test.zip). Let me know if I should do anything else.
Grusha.
grusha.prasadParticipantThank you for the prompt response! I changed the archive structure (https://consonant-perception-exp1.s3.us-east-2.amazonaws.com/ogg_test.zip) but it still gives me the same error đ
grusha.prasadParticipantHi Jeremy,
Thank you! That seems to resolve the CORS issue. However, now I get a 404 error.
Failed to load resource: the server responded with a status of 404 ()
The zipped folder does contain the file though. So it seems like it has access to the zipped folder but it was not able to preload the contents of the folder? Do you know what might be happening?
Thanks again!
Grusha.
grusha.prasadParticipantHi Jeremy,
It seems like my .htaccess is also not doing its job. When I inspect the console this is one of the errors:
Access to XMLHttpRequest at 'https://consonant-perception-exp1.s3.us-east-2.amazonaws.com/ogg_test.zip' from origin 'https://expt.pcibex.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I checked to make sure that it does not have .txt and that it is named appropriately. Here is the file on the server (and it is in the same directory as the .zip file): https://consonant-perception-exp1.s3.us-east-2.amazonaws.com/.htaccess
Do you have suggestions for how I might go about debugging this?
Thank you,
Grusha.June 4, 2019 at 10:30 am in reply to: ‘How to use a spreadsheet’ tutorial – Experiment not loading #3698grusha.prasadParticipantHi Jeremy,
Thank you for your response. I managed to figure out what the issue with my CSV file was. Will use 1.4 for future issues I need to debug. Thanks again!
Grusha.
June 3, 2019 at 6:07 pm in reply to: ‘How to use a spreadsheet’ tutorial – Experiment not loading #3696grusha.prasadParticipantFollowing up on this. Did you ever manage to find a fix? I am running into a similar issue.
Thanks!
Grusha.
-
AuthorPosts