Stairhandler depreciation error with 'db' and 'lin'

29 views
Skip to first unread message

richf

unread,
Nov 8, 2012, 8:37:54 AM11/8/12
to psychop...@googlegroups.com
Hi all,

I am preparing a task that involves a staircase procedure, with a variant of the flicker fusion paradigm. 2 digits are presented for various frame times, which are changed according to the stairhandler. The aim is to alter the presentation times to find the threshold. I have used the stairhandler class, with the start value referring to frame rate. It seems to be working but whether i use a 'db' or 'lin' type ('log' does not work at all) i still get the following error  :

 DeprecationWarning: integer argument expected, got float
  for frames in range(increment):

Even though it seems to be working, i still don't like this error - what effect will this really have? Is it a problem?

I should add that i am a beginner at programming so my code may not be efficient. If anyone can shed any light on this error and its impact on the study then i would greatly appreciate it.

Please note, i have commented out certain lines that, for the present purpose, are irrelevant. Also, the nTrials is set to 10 for practice only, so ignore this actual figure. The file should be attached.

Many thanks to all

Richard
stair attempt frames.py

Rebecca Sharman

unread,
Nov 8, 2012, 10:04:14 AM11/8/12
to psychop...@googlegroups.com
Hi Richard,

The problem is that your variable increment is a float and the range() command only accepts integers. For example, range(10) would produce the numbers 0 to 9 but range(0.3) just produces an error. Assuming that your increment actually is a whole number try increment = int(increment) before putting it into range.

Hope that helps,
Becky


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/pemlQk_lfpYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

richf

unread,
Nov 8, 2012, 10:27:16 AM11/8/12
to psychop...@googlegroups.com
Becky,

Thanks, i think that helps. I just tried it and no errors were generated so thank you. If it's not asking too much, would you be of help for my recent post, involving frames not core.wait?

Cheers again

Richard
Reply all
Reply to author
Forward
0 new messages