Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

KeyError: u''

Hey,
I am trying to create a very basic template for eye tracker & n-back experiment. I keep getting this error. I am new to open seasmae, used to work with eprime. I don't understand the error. It might be that there is a column of correct_response in the block loop but only 2 out of 8 trails are assigned a response, and the other trails are without mouse response. Why is it a problem ?
Thanks !!!
Keren

Comments

  • Hi

    Could you attach you code, would make it easier to debug.

    Gary

  • Hey Gary,
    Right now I solved it with using None in the correct_response column for the trails which demand no mouse response. I am not sure how it logs because the data file looks weird in terms of RT (it might be accumulative for some reason, is there a possibility to get raw RT ?). The data file of the PYGAZE is very unclear. I would appreciate if you can have a look and let me know if it looks normal and how the trails are presented here. Again, it is just a template for the practice block, if it works well I will create the rest of the experiment. I will appreciate any guidance :-)
    Bests,
    Keren

  • Hi Keren,

    What exactly is unclear? Your data file looks very fine to me. Also the RTs look just the way I would expect them to look.

    Eduard

    Buy Me A Coffee

  • Are these two columns are the raw response time ? because only in trial 4 and 7 the subject should respond by a mouse click and timeout/ duration should be less than 1000 ms. Then the question is why trials 5, 6 and 8 are less than 1000ms. Do you have any idea ? I assumed that I don't understand the variables presentation in the output but maybe it is due to something else.
    Thanks a lot for your kind help ~

    average_response_time avg_rt
    1000 1000
    1000 1000
    1000 1000
    768 768
    814.4 814.4
    845.3333333 845.3333333
    724.5714286 724.5714286
    759 759

  • Oh, I see! Those variables are indeed average response times. Opensesame computes them automatically. In your case, these variables are not really meaningful. So you should consider just using the raw response times per trial (the variable response_time in column CF) and work with that.

    Eduard

    Buy Me A Coffee

  • Hey Eduard,
    I see the column response_time (BN in my data file) is entirely 1000. Then I understand that the way I defined the mouse_response is improper. Please tell me if I did something wrong (maybe the timeout setting ...)?

    define mouse_response mouse_response
    set timeout 1000
    set show_cursor no
    set flush yes
    set duration mouseclick
    set description "Collects mouse responses"
    set allowed_responses "1;3"

    I also have a very stupid question as in other experimental programs like eprime and presentation the response is defined in the stimulus or target object, I assume that here the mouse_response starts with the stimulus / target in terms of timing ?

    I am sorry, something with the logging is still foreign to me.
    I appreciate your help.
    Keren

  • Hi Keren,

    BN in my data file

    I used the data file you attached above, so there it is CF. If you changed the number of items you have in your script, the columns might have shifted.

    Then I understand that the way I defined the mouse_response is improper.

    A response time of 1000 according to your mouse_response, means that no response was given (because 1000 is the timeout). ANything that is lower than that means that you have given a response, so clicked a button.

    I assume that here the mouse_response starts with the stimulus / target in terms of timing

    The response time is given, by the time the mouse_response is run the first time. So if something happens between stimulus presentation and the intiliazation of the mouse response, you might miss responses and and your response time will be consistently smaller. Therefore, it is important that the response collection follows right after stimulus presentation without further redo (unless of course you want some)

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.