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?
i have altered legacy code for a flashing radial checkerboard stimulus (with a small circular central fixation that changes colors randomly) that worked fine in psychopy v2023.2.3 but now not in v2024.2.4 (compatibility+ standalone installed today). a window for user options opens and is able to be set, but then the experiment breaks and iâm getting the same errors (âTypeError: takes no argumentsâ) with both RadialStim() and PatchStim(). iâve tried moving my script location, adding those 2 lines up top (after i think correctly installing plugins at CLI as well as via Psychopyâs commandline), restarting psychopy (and computer) many times. are there other solutions? please help if you can. i realize some of those functions have been deprecated. iâm all ears for easy drop-in replacements but since itâs legacy code i might be a tad slow on whatâs exactly happening (insert monkey with shamed hands over face emoji). thanks in advance! here are the main visual definitions:
Youâll still need those lines about activating plugins in future versions if youâre coding from scratch, yes. Theyâre added automatically if you use Builder.
The reason is that RadialStim and PatchStim are both now in plugins rather than the core library: RadialStim and NoiseStim are in psychopy-visionscience, PatchStim is in psychopy-legacy.
When you have those plugins installed, you can always import these classes directly from the plugins (e.g. from psychopy_visionscience.radial import RadialStim), but calling activatePlugins tells PsychoPy that when you ask for visual.RadialStim it should give you psychopy_visionscience.radial.RadialStim instead. Without those lines, youâll get the PluginStub placeholder from where that class used to be in the library, hence the error.
Although, in 2025.1 onwards, you should get a more helpful error than that âTypeError: takes no argumentsâ one! When you try to initialise a PluginStub, it should now give a PluginRequiredError telling you where the class has been moved to.