Open mdcutone opened 4 years ago
That's a really weird one. I can't replicate it. Probably this is to do with a numpy version (it recently got more strict on indexes not being floats)
BUT the error stack doesn't point to a line where an integer should be needed at all. I wonder if the error trace is pointing to the right version of PsychoPy :-/
I encountered the same error (PsychoPy3, version 2021.1.4 running on macOS Catalina).
To figure out what's going on, I put the following lines into staircase.py
right before the line where the error is thrown:
for i, rev in enumerate(self.reversalIntensities):
print(rev)
print(type(rev))
print(str(rev))
Re-running gammaMotionNull
then gives the following output:
0.30000000000000004
<class 'float'>
Traceback (most recent call last):
File "/Users/christina/opt/anaconda3/envs/sig_det_exp/lib/python3.6/site-packages/psychopy/demos/coder/experiment control/gammaMotionNull.py", line 165, in <module>
stairCases[1].saveAsText(fileName + 'hi')
File "/Users/christina/opt/anaconda3/envs/sig_det_exp/lib/python3.6/site-packages/psychopy/data/staircase.py", line 475, in saveAsText
print(str(rev))
TypeError: cannot convert 'float' object to bytes
So when checking the type it seems to be a float, which should be convertible to a string using str()
. But then it cannot be converted ... Any ideas what could cause this?
When saving the data from the
gammaMotionNull
demo I encounter this error:This is from PsychoPy version 2020.1.3 running on Win10.