AttributeError: 'str' object has no attribute 'Red' in Stroop Experiment

Problem Description:
I encountered the following error after conducting a Stroop experiment in PsychoPy.

Operating System:

  • Windows 11

PsychoPy Version:

  • PsychoPy 2023.2.2

Error Details:
I’ve encountered the following error traceback:

Traceback (most recent call last):
  File "B:\01_Software\PsychoPy\lib\site-packages\wx\lib\agw\aui\framemanager.py", line 8755, in OnRender
    self.DrawPaneButton(dc, part, point)
  File "B:\01_Software\PsychoPy\lib\site-packages\wx\lib\agw\aui\framemanager.py", line 8260, in DrawPaneButton
    self._art.DrawPaneButton(dc, self._frame, part.button.button_id,
  File "B:\01_Software\PsychoPy\lib\site-packages\wx\lib\agw\aui\dockart.py", line 765, in DrawPaneButton
    dc.SetBrush(wx.Brush(StepColour(self._inactive_caption_colour, 120)))
  File "B:\01_Software\PsychoPy\lib\site-packages\wx\lib\agw\aui\aui_utilities.py", line 69, in StepColour
    r, g, b, a = c.Red(), c.Green(), c.Blue(), c.Alpha()
AttributeError: 'str' object has no attribute 'Red'

Issue Description:
I encountered the above error after conducting a Stroop experiment using PsychoPy. The error appears to be related to an issue within the wxPython library. The error message points to an ‘AttributeError’ with the message 'str' object has no attribute 'Red'.

Steps Taken to Resolve:
I haven’t attempted any specific fixes yet since I’m not sure how to address this issue.

Additional Information:
If you need any additional information about my Stroop experiment setup, configurations, or any other details, please let me know. I would appreciate any guidance or insights on how to resolve this error.

You can try reinstalling PsychoPy.

Even though I’m not sure about the specific mechanism… it worked, thank you!