View Single Post
  #1  
Old 08-18-2014, 12:56 PM
armo armo is offline
Member
 
Join Date: Mar 2014
Posts: 21
DeprecationWarning when running a yield statement

Hello

I am working on this script where I run a task, wait for the user to give a mouse response and store the reaction time. Below is the task:

Code:
def example_trial():
    response = viz.Data()
    startTime = viz.tick()
    yield viztask.waitMouseDown( None, response )
    print 'response at: ', viz.tick() 
    reactionTime = response.time - startTime
    print reactionTime

but when it comes to the yield line it gives me this warning, and I can't figure out what it means and how to fix it

Code:
DeprecationWarning: "data" option will be removed in future versions, use "[data] = yield [condition]" instead
  yield viztask.waitMouseDown( None, response )
P.S. I have run the same code with a previous Vizard version and then I didn't get the warning
Reply With Quote