Howdy, Stranger!

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

Supported by

[solved] mouse_responses

edited January 2014 in OpenSesame

Hi Sebastian,
i have designed my experiment by opensesame as following:

fixation_dot (Duration: 750ms)
picture_prime (Duration: 750ms)
pause_1 (Duration: 500ms)
question_mark (Duration: 0) (start of response interval)
sound_target (Duration: 0) (start of response interval)
mouse_response (timeout: 2000ms)
pause_2 (Duration: 1000ms)

After a mouseclick the response time should be collected and the next item should be appeared. Now my problem:
the experiment runs trouble-free, while i click the mouse, the response time is collected, but if i don't click the mouse (as i don't know the correct response), give opensesame the following error message after the timeout (2000ms):
An unexpected error occurred, which was not caught by OpenSesame. This should not happen! Message:
'NoneType' object is unsubscriptable
best regards
Madjid

Comments

  • edited 1:39AM

    Hi Madjid,

    I see. Could you perhaps post the full error message (stracktrace) so I can see where there error occurs? You will find this in the debug window (Control+D).

    Cheers,
    Sebastiaan

  • edited January 2014

    thx sebastian,

    here the error message:

    Python 2.6.6
    Type "help()", "copyright()", "credits()" or "license()" for more information.
    Type "modules()" for details about installed modules and version information.
    Use the "print [msg]" statement in inline_script items to print to this debug window.
    >>> 
    openexp.sampler._legacy.init_sound(): sampling freq = 44100, buffer size = 1024
    openexp._canvas.legacy.init_display(): enabling hardware surface
    openexp._canvas.legacy.init_display(): enabling double buffering
    openexp._canvas.legacy.init_display(): video mode ok
    experiment.init_log(): using 'H:/Desktop/subject-0.csv' as logfile (ascii)
    experiment.run(): experiment started at Thu May 03 12:34:38 2012
    Traceback (most recent call last):
      File "libqtopensesame\qtopensesame.pyo", line 1647, in run_experiment
      File "libopensesame\experiment.pyo", line 258, in run
      File "libopensesame\sequence.pyo", line 59, in run
      File "libopensesame\loop.pyo", line 153, in run
      File "libopensesame\sequence.pyo", line 59, in run
      File "libopensesame\loop.pyo", line 153, in run
      File "libopensesame\sequence.pyo", line 59, in run
      File "libopensesame\mouse_response.pyo", line 98, in run
      File "libopensesame\generic_response.pyo", line 108, in process_response
      File "<string>", line 1, in <module>
      File "libopensesame\generic_response.pyo", line 90, in process_response_mouseclick
    TypeError: 'NoneType' object is unsubscriptable
    >>> 
    

    best regards
    Madjid

  • edited 1:39AM

    Hi Madjid,

    Ow, it's a bug, unfortunately. I filed it here: https://github.com/smathot/OpenSesame/issues/85. Thank you for bringing it to my attention.

    As a workaround, you could use the following inline_script instead of the mouse_response item (put the code in the run phase tab):

    from openexp.mouse import mouse
    start_time = self.time()
    my_mouse = mouse(self.experiment)
    button, position, timestamp = my_mouse.get_click(timeout=2000)
    self.experiment.set('response', button)
    self.experiment.set('response_time', timestamp-start_time)

    Hope this helps!

    Cheers,
    Sebastiaan

  • edited 1:39AM

    Hi Sebastian,

    thank you very much for the Script! Opensesame runs now perfect, but an another problem hat arisen. opensesame can no more evaluate the mean response time and accuracy as feedback for each subject at the end of each phase. It give an 'undefinde' response time and accuracy.
    best regards
    Madjid

  • edited 1:39AM

    Hi Madjid,

    Ow yes, that slipped my mind. If you record the responses manually, you also need to explicitly keep track of the feedback. There is another discussion where I posted some example code, which you should be able to use pretty much straight away: http://forum.cogsci.nl/index.php?p=/discussion/comment/361#Comment_361

    Cheers,
    Sebastiaan

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games