attentional blink with emotional pictures
in OpenSesame
Hello again! I am trying to build an attentional blink experiment with images and used the script from the tutorial along with some other amendments but i keep getting the error : 'IOError: The picture file 'c' does not exist'. I checked if the images are in the pool and they certainly are since it shows me the path in the debugg window so what is going on? Thanks on advance.
Comments
Hi Maria,
Instead of adding images to your stimulus list like that :
images_list += random.choice(list), try this:images_list.append(random.choice(list)). I think doing it your way treats the stimuli as strings rather as a list object.Can you confirm that this solves the issue?
Thanks,
Eduard
It worked! But now i am having trouble to set a correct response since it is based on some conditions. I need to log the correctness of the answer in every trial so that i have the variable "correct" with it's values in every trial in the final log file, but i am getting the error "NameError: name 'correct' is not defined".
I used that code in every inline script i am using as a trial, to set the correctness of a response:
and this code (also in every inline script) to log the things i need but correctness can't be logged.
self.experiment.log('response = %s' % key)
self.experiment.log ('lag = %s' % target_pos)
self.experiment.log ('correct = %s' % correct)
Any advice on that? Thanks again, I am really new to programming with python.
I can't tell you where your mistake is because I don't know enough about your script. However, the error that you get appears due to some of the if-else statements not being executed (I guess). For example, if the variable
responseis never 'z' or 'm' then the variablecorrectwill never exist. So, what you need to do is using print statements to check which values ypur variables have and which of your if statements are actually executed. Eventually, you should find out what is going wrong.Does this make sense,
Eduard
I figured i should give 'correct' a value after every if statement and set response_correct at the end of all the statements. It worked
Hi again! Can anyone tell me what is the analogue of duration "keypress" (e.g. in a sketchpad with a fixation dot) for a canvas of inline script? I need to insert a break between my loops and i want everything to be able to pause until a keypress is made.. Thank you!
Hi Maria,
Here you go:
Eduard
Thanks! I considered using the "pause o.s." command but it seemed too drastic