OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): version 3.15
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:
I am trying to make it possible for me to adjust my stimGrating contrast from expInfo gui.
What did you try to make it work?:
I added a field named contrast in Experimental Settings. I added in some custom code under my trial routine. Under the Begin Experiment tab I entered:
grating.contrast = expInfo['contrast']
What specifically went wrong when you tried that?:
File “C:\Users\Quantum\Documents\Projects\testStim_lastrun.py”, line 422, in
win.flip()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\window.py”, line 750, in flip
thisStim.draw()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\grating.py”, line 308, in draw
self.contrast)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\basevisual.py”, line 443, in _getDesiredRGB
desiredRGB = (rgb * contrast + 1) / 2.0
TypeError: ufunc ‘multiply’ did not contain a loop with signature matching types dtype(’<U32’) dtype(’<U32’) dtype(’<U32’)[testStim.psyexp|attachment]
(upload://lQ2076wV1JpXMLobyAWnxSkM2PP.psyexp) (24.9 KB)