[open] Logging problem - Pygaze_log
Hi, recently adapted my script to pygaze. It has worked perfectly fine in standard opensesame.
participants are presented with a sentence followed by a question using an inline script before I use a keyboard response module to collect the answer to the question. My problem is that after adding the pygaze modules, The experiment simply skips the question/ answer bit by only leaving on the screen for a few milliseconds before moving on to next trial.
this is the inline script for the question and sentence
trial_list=  from openexp.keyboard import keyboard trial_info = full_list[self.get('count_trial_sequence')] sentence = trial_info['sentences'] question = (trial_info['question'] +"\n \nYES (Y) NO (N)"+'\n') answer = trial_info['answer'] item = trial_info['item'] print(item) print(sentence) print(question) if answer == "n": print("NO") else: print("YES") kb = keyboard(exp,keylist= ['t'],timeout = 27000)
from openexp.canvas import canvas my_canvas = canvas(exp) my_canvas.text(sentence, center=False, x=60, y=350, max_width=None, color=None, bidi=None, html=True) my_canvas.show() #Key clear sentence canvas and music kb.get_key() my_canvas.clear() sound.stop() #Displays Question my_canvas_question = canvas(exp) my_canvas_question.text(question, center=True, x=None, y=None, max_width=None, color=None, bidi=None, html=True) my_canvas_question.show()
set duration "keypress" set font_family "mono" set font_size "18" set foreground "black" set maxchar "50"
before I have the keyboard module with the following settings.
set allowed_responses "y;n" set correct_response "(trial_info['answer'])" set flush "yes" set timeout "infinite"
This is followed by the logger.