Button component: Experiment crashes after clicking with mouse

OS: macOS BigSur 11.6
PsychoPy version: 2021.2.3
Standard Standalone? (y/n) y
What are you trying to achieve?:

I want to use the button component to end my routine that contains a form component. The form works fine, but when I use the button component to end the routine, then experiment crashes. It looks like a bug to me and this is the error message I get in the console of the experiment runner:

For the settings of my routine, it looks like this:


where the form refers to an excel sheet with some multiple choice and free text questions (these work fine) and the mouse component is only accepting clicks for the form.

I will post the settings for the button component in the comments as I can only upload 2 images.

If you know the answer to my problem, please let me know!
Thanks, Klemens

Settings for the button component:


and finally: