Possible bug - Builder crashes when typing a dollar sign into a text component

OS : Ubuntu 20.04
PsychoPy version: 2021.2.2
Standard Standalone

What happens:
When I type a dollar sign ($) at the beginning of a text component, Builder gives an error and crashes.
If I type the $ at a different position in the box, nothing happens (please, see the gif below):

Builder_crash_with_dollar_sign

Error message:

Traceback (most recent call last):
File “/home/flavio/.local/lib/python3.8/site-packages/psychopy/app/builder/dialogs/paramCtrls.py”, line 29, in validate
validate(self, self.valType)
File “/home/flavio/.local/lib/python3.8/site-packages/psychopy/app/builder/dialogs/paramCtrls.py”, line 442, in validate
val = str(obj.GetValue())
RecursionError: maximum recursion depth exceeded while calling a Python object

It happens in a new file - I just have to start Builder and insert a text component.
The same was not happening with the previous version of Psychopy (same OS and machine).

I’m available to run diagnostics.

Cheers!
Flavio

Thanks for flagging! - just tested on windows and can’t replicate - maybe ubuntu specific? but does look like a bug would you be ok to put this as an issue on github so the dev team can test it?

Thanks!
Becca

Hi Becca!

Done :slightly_smiling_face:

Here is the link, in case someone comes looking for this.

Best,
Flavio

I can confirm that this happens on the latest PsychoPy on Manjaro (i.e. Arch-based distro) as well. I think that may mean this happens on all Linux systems. The error message suggest that some recursive function in the program simply repeats infinitely, but I’ll keep looking for solutions.

Dear all!
I found the same “bug” running in Ubuntu 20.04, inside an environment.
I really appreciate any contribution.
Best wishes!

Are you using the latest version of PsychoPy (2021.2.3)?

There does seem to be a similar bug here:

Yes, my friend! I’m using the recent version.
When I use the dollar sign in any text area, as in random variables in sense to create aleatory reading, the builder closes Psychopy.
I have no idea what happens.

Dear all,
I noticed the dollar sign is used as a delimiter to code in text fields, inside Psychopy.
However, the same sign maybe interpreted as an illegal mark by Python interpreter in the recent version, as in the example in Python:

fred$ = ‘alex’
SyntaxError: invalid syntax

I really not use this above syntax, otherwise, the properly $text to text variable in the text fields.
I tried to install older versions, within and without virtual environments, and the same crash appears again. I use Ubuntu 20.04 with Psychopy 2021.2.3.

Dear all,
I personally resolve this task once creating the experiment in the builder, insert the variables in the text field with space before, and, modified the variables directly in Python code, removing the dollar sign.
The experiment runs perfectly.

I believe our resident Linux user @mdc has fixed this for the next release :slight_smile:

1 Like