Howdy, Stranger!

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

Supported by

[solved] version 2.9.2

edited January 2015 in OpenSesame

Hey,
An exp i built using version 2.8.0 is not working properly (the inline script) on the new version. Is there any solution for the problem?
Thanks,
Rotem

Comments

  • edited 6:49AM

    Hi,

    We can only provide good support, if you provide enough information on the issues you have. Based on your question, I can only recommend using the old version of Opensesame and not the new one. However, this is of course not optimal. Therefore, I'd like you to post your error message and maybe the code that you run that leads to the error here in the forum. Otherwise, we have no way of knowing what went wrong.

    Thanks,

    Eduard

    Buy Me A Coffee

  • edited January 2015

    Hey, i don't have an error message, just that my inline script doesn't run on the new version and i only see a black screen. This is my inline script:

    from psychopy.visual import DotStim
    from psychopy import event
    from openexp.keyboard import keyboard
    # Create a DotStim, which is automatically updated with every `draw()` call.
    ds = DotStim(win, fieldSize=900, speed=4, dotLife=22, nDots=500, coherence= \
        self.get('coher'),dotSize=3,signalDots='different',dir=self.get('dir'), \
        noiseDots='direction')
    t0 = self.time()
    if self.get('dir')==0:
        exp.set('correct_response','l')
    else:
        exp.set('correct_response','s')
    
    response_time = 0
    while response_time == 0:   
        for i in range(500):
            if i % 2 == 0:
                ds.draw()
            win.flip()
            keys = event.getKeys(keyList=['s', 'l'])
            if keys != []:
                t1 = self.time()
                response = keys[0]
                response_time = t1 - t0
                exp.set('response', response)
                exp.set('response_time', response_time)
                if self.get('response')==self.get('correct_response'):
                    exp.set('correct',1)
                else:
                    exp.set('correct',0)
                break
    test_rt.append(response_time)
    print(response_time)
    print(test_rt)
    
  • edited 6:49AM

    Hi,

    I had to disable the variables that you define in your sequence, because I can't see which format they have, but after doing that, the experiment was working with the new version.
    If you don't get an error message, you can try printing out as much stuff as possible, to see whether everything looks like it should.

    Good luck,
    Eduard

    Buy Me A Coffee

  • edited 6:49AM

    Hey Eduard,
    Not sure i understand what you mean by printing out as much stuff as possible.
    I tried again with no success. I think there in no error but that the moving dots in my exp become highly apart from one another in a way it's not possible to detect them on the screen. Maybe it has something to do with the computer screen definitions and the new version.
    Attached is my exp: http://pastebin.com/KLkJE7DF
    Thanks,
    Rotem

  • edited 6:49AM

    By printing out stuff I mean, you can use the print command to display variables and useful information in your debug window.
    E.g.


    ls = list(range(6)) for i,j in enumerate(ls): print 'enter the %ith iteration of loop'%i if j%2 ==0: print '%i is even'%j else: print '%i is odd'%j # this prints: #enter the 0th iteration of loop #0 is even #enter the 1th iteration of loop #1 is odd #enter the 2th iteration of loop #2 is even #enter the 3th iteration of loop #3 is odd #enter the 4th iteration of loop #4 is even #enter the 5th iteration of loop #5 is odd

    I tried your experiment and it works for me. So it is most likely no bug of Opensesame. What you can try is checking, the foreground/background colors, the backend you use, and other similar settings.

    Eduard

    Buy Me A Coffee

  • edited 6:49AM

    O.k thanks!

Sign In or Register to comment.