| Reference | Downloads | Github

Runtime problem - Psychopy programs run on personal machines but not on school lab machines

Hi all, I’m running Psychopy version 1.84.2 on a Dell PC running Windows 10 (this is in a computer lab - I requested that the standalone version be installed, but I don’t have control over this). Any suggestions would be appreciated (I don’t think the tech support department is familiar enough with Psychopy to offer a lot of support).

I’m having some runtime issues with programs that run perfectly well on my home computer that runs Windows 7 using version 1.84.2, as well as on my office computer that runs Windows 10. When I start Psychopy on the problematic computers, I see a dialog box with the title “Compatibility information” that contains the following text:

From 1.73.04 to 1.84.2:
There were many changes in version 1.74.00 that will break compatibility with older versions. Make sure you read the changelog carefully before using this version. Do not upgrade to this version halfway through an experiment.

When I try to run a program that runs on the other machines, I get the following output (Note: I had to change filenames that ended in .py because they were being interpreted as links in this message - they appear as .p*):

Traceback (most recent call last):
File “C:\Users\dickinsonca\Documents\WM and STM span\STM span\”, line 74, in
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\text.p*”, line 157, in init
self.setText(text, log=False)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\text.p*”, line 285, in setText
setAttribute(self, ‘text’, text, log)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\tools\attributetools.p*”, line 137, in setAttribute
setattr(self, attrib, value)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\tools\attributetools.p*”, line 27, in set
newValue = self.func(obj, value)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\text.p*”, line 276, in text
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\text.p*”, line 295, in setTextShaders
width=self.wrapWidthPix) # width of the frame
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font_init
.py", line 353, in init
self.font = font
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font_init
.py", line 377, in _set_font
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\layout.p*”, line 824, in end_update
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\layout.p*”, line 911, in _update
lines = self._get_lines()
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\layout.p*”, line 887, in _get_lines
glyphs = self._get_glyphs()
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\layout.p*”, line 1016, in _get_glyphs
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font\base.p*”, line 379, in get_glyphs
glyph_renderer = self.glyph_renderer_class(self)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font\win32.p*”, line 103, in init
self._create_bitmap(width, height)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font\win32.p8”, line 304, in _create_bitmap
self._data = (ctypes.c_byte * (4 * width * height))()
OverflowError: cannot fit ‘long’ into an index-sized integer

Any suggestions or ideas would be appreciated - thank you in advance.

Chris Dickinson

That’s a strange error. Have you tried running a “minimal” program that draws no stimuli? Just to see if you can even open a window on the lab PC. This seems to be a bug with text rendering. The lab PCs might be missing libraries, but we need to rule out a driver issue.

I have two programs that I’ve run successfully before I had this problem. One displays text instructions, followed by text, an image from an image file, and a polygon that takes a keyboard response. The other is a variation of the Stroop task that can be found in an online tutorial. That program displays text in different colors, as well as displaying polygons in different colors. I retested those two programs and found both to work on a machine that gives me the error messages listed above for other programs. I created the programs that run on the lab machine and the ones that don’t on the same computer (not the lab machine), and all of the programs work fine outside of the lab. If I click the links in the error output, they open the files in question on the lab computer, and I can see the code that is referenced - I don’t know if that helps or not. Is it at all possible that this could result from someone not installing the standalone version of 1.84.2? I requested that the standalone version be installed, but I don’t know that it was. If you need more information (including the programs that are working and/or the ones that are not), please let me know. Thanks again.


I found the answer - the error is the OverflowError, and it was caused because the “units” setting on the problematic computer was set to “norm” - all of the values in the program indicating letter or image size were in pixels. When I changed the “units” setting to pix, the programs ran without a problem. It appears that the program was trying to make everything too large (e.g., making a letter that was supposed to be 50 pixels in height 50 normalized units in height instead), which was causing the overflow error.

Hi, despite your solution, I can not find the answer to the problem, even by changing the unit. I’m on Mac. Can you explain more precisely what did you do ? Or another suggestion ? Thank you !