Segmentation fault running Psychopy 3.1.2 in Windows 10 caused by unicode keyboard name

Hi,

I have just installed Psychopy 3.1.2 on my Windows 10 64 bit system using the standalone package currently recommended on the Psychopy web page.
When I run my programmes I usually start with some text describing what I am asking people to do. Currently the screen gets blanked to grey (as it should) but no text appears. After something times out (not sure what) I then get a segmentation fault error that looks like this:

The Psychtoolbox library was loaded by the standalone installation and is in C:\Program Files (x86)\PsychoPy3\Lib\site-packages\psychtoolbox. The folder pointed to seems to be the right place but points to the folder Lib rather than lib. If that is the problem I don’t know where to change it. If it isn’t the problem does anyone have any suggestions?

Thanks

David

Ah, sorry about that. There was an issue in the psychtoolbox code that converts keyboard names into . We have a fix for it but possibly that wasn’t included in the 3.1.3 release (I’ll have to check). Basically, some machines have keyboards that report their name with a unicode character in (e.g. a ® or ™) and those have been showing a seg fault on windows.

The best workaround, right now, is probably to install the 32bit version of PsychoPy 3.1.3 in which the psychtoolbox code is disabled (it doesn’t compile for 32bit computers). We’ll try and have the proper fix released very soon.

OK you may be able to fix this and keep using psychtoolbox (faster) keyboard handling by updating that package:

  • open a cmd prompt as admin
  • paste in: "C:\Program Files (x86)\PsychoPy3\python.exe" -m pip install -U psychtoolbox

With any luck that will update the psychtoolbox lib to 3.0.15b1 and that should fix the bug.

Otherwise, as above the solution will be to install PsychoPy 32bit (so that ptb isn’t there at all)

Jon,

Thanks. I have the 64 bit version running now, after that patch.

Hope all is well in Nottingham.

David

Ah! Great to know that worked. Thanks.

Do you need a build (3.1.4) to fix that for your installation across machines in the lab, or is it something you can apply to the other machines from what you’ve got already?

(yes, things in Nottingham are good thanks, and I’m soon to work on PsychoPy full-time for the first time, which is pretty exciting!)

Jon,

It would be really helpful to have a build that incorporated everything, if that isn’t too much trouble but we could do it with what
we have. Talking to the IT guys this morning but we have multiple installations to do and I was also hoping to show students (approx. 600) how it worked and point them to an installable link.

I was guessing you were spending near full-time on Psychopy already but I am sure it would be good to have that as the official role.
I have found the book to be very helpful.

Cheers

David

OK, yes, the question in my head was whether to roll this over for the 3.2.0 major release but I’ll do another bug-fix release (3.1.4) as well then

I had already pretty much stopped running my own experiments but had a regular teaching/admin load this year. As of Sept (for a year initially, depending on people buying pavlovia credits) I will be dropping nearly all to work on this.

Jon,

Sounds like an interesting change. It must be rewarding to have so many people use your software but I suspect it does produce a lot
of questions.

I do have one more. I want to use Builder for the students but I want to make a circular annulus filled with a grating. Have you ever
made an annular surround mask? We are looking at centre-surround contrast suppression in the labs. I assume it is best to write some code for the mask and include that but thought I would ask before I reinvent the wheel.

Cheers

David

In all honesty, the easiest thing to do is probably draw a circular grating and then another that occludes the centre (with contrast=0 to make it grey). Draw the masking circle second (lower int he Routine) so that it occludes the texture. You could create an annular mask using textures but then you’ll need to recreate it if you decide to change annulus width

Jon,

Thanks for the suggestion. That is working fine and was a quick fix. I hadn’t thought much about the utility of the order of things
in builder. This is a version that students will find easy to follow, whereas telling them to programme an annulus wasn’t really on. They are only 3rd years.

Much appreciated

David

OK, the bug-fixed psychtoolbox lib is included in the 64bit PsychoPy 3.1.4: