picture not shown on mac (but in windows)
I want to use several notebooks for an experiment. Therefore it should work on mac and on windows.
However, one picture is not shown on mac. And i have no clue why.
Here the problematic code:
for iii in range(60): #practice is 60 times
var.Counter = iii+1
#make a break every 10 trials
if iii!=0 and iii%10==0:
Break1.text(str(iii)+'/60', y=-350)
Break1.show() #### THIS is the picture which is not shown on mac, on windows it works fine
clock. sleep (5000) #mind that i had to set a _ space for the forum ;-)
Break2.show()
Break1.text(str(iii)+'/60', y=-350, color="white")
leer.flush()
key, time = leer.get_key()
#trial start
TRIALhalf1()
if var.subject_nr%3 ==0: #set action mode
TRIALhalf2_IMA()
elif var.subject_nr%3 !=0:
TRIALhalf2_EXE()
On Windows it shows Break1, requests 5 sec break, and then it shows Break2.
On Mac it remains with the previous picture (from TRIALhalf2) and requestes 5 sec break, and then shows Break2 directly. Hence the sleeper sets in, but the picture Break1 is not shown.
My Ideas:
1. Has to do with changing the picture beforehand, and adding feedback text. But why?
2. Has to do with the end of TRIALhalf2? But why? Anyway i will put the code for the definition too. So you can what is in it.
def TRIALhalf2_IMA(): #2nd part of a trial
green_time= go_0.show()
#lift space, log time and key
key_up, time_key_up = leer.get_key_release()
empty.show()
#log stimulus presentation and response
var.Resp = key_up #log keyup SPACE
var.Resp_t = time_key_up
var.Resp_RT = time_key_up - green_time
var.Resp_Num = 0
log.write_vars()
#press 10 numbers, log time and key
#press space, log time and key
var.N_COR = 0
for i in range(1): #only one response in IMA, but keep the code equal
key, time=numbers.get_key()
var.Stim_t= green_time
var.Resp = key
var.Resp_t = time
var.Resp_Num = 11
if key == 'space' :
var.Resp_Cor = 1
if key != 'space' :
var.Resp_Cor = 0
var.N_COR = var.N_COR + var.Resp_Cor
if var.Resp_Num == 11:
var.Resp_t_lastNum = time
var.Resp_MT_lastNum = time - time_key_up
var.Resp_MT = time - time_key_up
var.N_CORR_withoutSPACE = None
var.Resp_Perc_F = var.Resp_Cor*100
var.Resp_RTMT = var.Resp_RT+var.Resp_MT
log.write_vars()
#give feedback about duration but not corrects
FB = canvas()
FB.text('Zeit: ', font_size=24, x=-50, y= 50)
FB.text(format(var.Resp_RTMT/float(1000),'.2f') + ' sec' , font_size=24, x=70, y= 50)
FB.show()
clock. sleep (995) #no response fixed timeout #30 sec break = 29995
FB.text('Zum Fortführen bitte Leer-Taste gedrückt halten' , font_size=18, x=250, y= 150)
FB.show()
leer.flush()
key, time = leer.get_key()
Any other ideas? Ideas for workarounds appreciated.
Comments
Hi,
This sounds very much like this Mac OS-specific issue, which has been fixed a while back in 3.1.7. Could that be it? Are you running an older version of OpenSesame?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi sebastiaan and @Daniel,
It was the same issue: Two stimuli after each other with the first only having a clock. sleep
The workaround with any kb.flush() before clock sleep helped!
The issue occured with 3.2.5 Kafkaesque Koffka using an old Mac.
You are doing great work!
Stephan
Hi Stephan,
Thanks for pointing this out. I re-opened the issue, and we'll take a closer look at why the problem still persists.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
It happened on a macos high sierra Version10.13.6, MacBook Pro