mpinsk
February 20, 2025, 4:39pm
1
From v2024.1.2 onward , I get this error when trying to use visual.RadialStim
stimulus1 = visual.RadialStim(
File "/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/contrib/lazy_import.py", line 118, in __call__
return obj(*args, **kwargs)
TypeError: RadialStim() takes no arguments
No issues prior to 2024.1.2. I tested all the other 2024 versions and some 2023 versions.
OS : MacOS 15
Psychopy Version : 2024.1.2 onward
Plugins : Psychopy-visionscience 0.0.7 is installed via plugin manager.
Here’s code I used:
from psychopy import visual, core, event
# Create a window
win = visual.Window(monitor='my_monitor', size=[2560,1440], fullscr=True, screen=0)
# Create stimulus
stimulus1 = visual.RadialStim(
win = win,
units='deg',
colorSpace='rgb',
size=20,
texRes = 512,
angularRes = 512,
tex="sqrXsqr",
color = 1,
contrast = 1,
pos = (0,0),
visibleWedge= (0,360),
mask = 'circle',
radialCycles = 2.5, # 5 rings
angularCycles= 10, # 20 slices
radialPhase = 0,
angularPhase = 0,
)
stimulus1.draw()
win.flip()
core.wait(3)
win.close()
core.quit()
thanks!
Mark
Hi @mpinsk ,
Could you try adding the following to the top of your script:
from psychopy import plugins
plugins.activatePlugins()
Thanks,
Kim
1 Like
mpinsk
February 21, 2025, 4:44pm
4
That worked! Any chance you can explain why I need that now and not in earlier versions? Just curious.
Thank you!!
Plugins were introduced in 2023 to reduce the size of the core package.
1 Like
Meng
February 25, 2025, 3:15am
8
I met the same problem but failed to solve it as you suggested.
Here I tried the same code, with the two lines on the top, but it did not work. PychoPy 2024.2.4 compatiblity+)
Thank you !
Meng
Here is the error information:
Running: C:\Program Files\PsychoPy-3.8\Lib\gm-practice\gm-practice-5.py##
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File “C:\Program Files\PsychoPy-3.8\Lib\gm-practice\gm-practice-5.py”, line 15, in
stimulus1 = visual.RadialStim(
File “C:\Program Files\PsychoPy-3.8\lib\site-packages\psychopy\contrib\lazy_import.py”, line 118, in call
return obj(*args, **kwargs)
TypeError: RadialStim() takes no arguments
################# Experiment ended with exit code 1 [pid:6016] #################
Here is the code example I tried as above:
Blockquote
#!/usr/bin/env python
from psychopy import visual, core, event
from psychopy import plugins
plugins.activatePlugins() # still do not work
win = visual.Window([1920, 1080], monitor=“testMonitor”, colorSpace=‘rgb’)
stimulus1 = visual.RadialStim(
win = win,
units=‘deg’,
colorSpace=‘rgb’,
size=20,
texRes = 512,
angularRes = 512,
tex=“sqrXsqr”,
color = 1,
contrast = 1,
pos = (0,0),
visibleWedge= (0,360),
mask = ‘circle’,
radialCycles = 2.5, # 5 rings
angularCycles= 10, # 20 slices
radialPhase = 0,
angularPhase = 0,
)
stimulus1.draw()
win.flip()
core.wait(3)
win.close()
core.quit()
Thank you !
Hi @Meng ,
Could you please try saving your script somewhere other than in PsychoPy’s Lib folder, for instance on your Desktop or in your Documents folder and see if it runs successfully then?
Thanks so much,
Kim