Error only with Random Dot Kinematogram ( RDK ) stimulus

If this template helps then use it. If not then just delete and start from scratch.

OS: Windows 10 Pro 64-bit (10.0, Build 19042)
PsychoPy version: 2021.1.4
Standard Standalone? Yes

Hi everyone! :grinning_face_with_smiling_eyes:

I am using the Builder and I tried running the Random dots Kinematogram stimulus, but an error occurs always, even with default parameters!!

Error:

Hello from the pygame community. https://www.pygame.org/contribute.html
1.0825 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Traceback (most recent call last):
File “C:\Users\hecto\OneDrive\Área de Trabalho\untitled_lastrun.py”, line 92, in
depth=0.0)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\contrib\lazy_import.py”, line 120, in call
return obj(*args, **kwargs)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\dot.py”, line 255, in init
self.dotLife = dotLife
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\tools\attributetools.py”, line 32, in set
newValue = self.func(obj, value)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\visual\dot.py”, line 326, in dotLife
self._dotsLife = abs(self.dotLife) * np.random.rand(self.nDots)
File “mtrand.pyx”, line 1156, in numpy.random.mtrand.RandomState.rand
File “mtrand.pyx”, line 421, in numpy.random.mtrand.RandomState.random_sample
File “_common.pyx”, line 256, in numpy.random._common.double_fill
TypeError: ‘float’ object cannot be interpreted as an integer

Experiment ended.

====================================================================================================================================

Thanks a lot!

1 Like

this likely explains the underlying problem, and a temporary solution.

1 Like

Thank you a lot !! that worked great

1 Like

Another kind of temporary solution is use the function int().I think that works great too!

1 Like