Monitor center not opening, even after reinstall

Hi, when I click the Monitor Center, nothing happens. I have tried restarting the computer, reinstalling PsychoPy, uninstall-restart-reinstall, I even upgraded to the new version. The original bug started on v 1.82, upgrading to 1.85 did not help. There’s this error message every time I click the monitor center icon:

Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\app\_psychopyApp.py", line 518, in openMonitorCenter
    None, 'PsychoPy2 Monitor Center')
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 213, in __init__
    self.updateMonList()
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 506, in updateMonList
    self.onChangeMonSelection(event=-1)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 569, in onChangeMonSelection
    self.loadMonitor(self.currentMonName)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 493, in loadMonitor
    self.updateCalibList()
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 527, in updateCalibList
    self.onChangeCalibSelection(event=-1)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 590, in onChangeCalibSelection
    self.ctrlScrPixHoriz.SetValue(locale.str(_sizePix[0]))
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 303, in str
    return format("%.12g", val)
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 196, in format
    return _format(percent, value, grouping, monetary, *additional)
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 202, in _format
    formatted = percent % value
TypeError: float argument required, not NoneType

This started happening after I tried to set up a new monitor in the Monitor Center. I closed the monitor center before finishing setting up the monitor and it won’t open again. Reinstalling the program does not help - but I also found out that PsychoPy keeps some of it’s settings even after reinstall (when I change the default view from Coder to Builder for example, then reinstall, the porgram will open in Builer again, and vice versa).

This makes me feel that PsychoPy keeps some data on the computer even after uninstalling. And that closing the Monitor Center before finishing monitor setup properly might have screwed up someihing in that data, which is preventing the Monitor Center from opening.

Thank you for any help.

Alright, I’ve been digging a little bit, solved part of the problem, but more problems came up. I figured out PsychoPy must be storing some data somewhere, that does not get deleted when uninstalling. I checked the App Data folder on my PC and indeed, there is a folder with PsychoPy app data. Deleting this folder made it possible to open the monitor center again. However, I still can not use the monitor center in a meaningful way, because once I close it, I can’t open it anymore. The way to reproduce this bug:

  1. Have a fresh install of PsychoPy 1.85.4

  2. Run PsychoPy and let it calibrate the monitor

  3. Wait until PsychoPy opens, click the monitor center icon, wait for it to open

  4. Do nothing, click “Save”, exit monitor center

  5. Click the monitor center icon again - the error message above will appear.

  • Deleting the PsychoPy folder in your App data let’s you go back to step 1

Moreover, when I try to create a new calibration entry for the test monitor (by clicking the “Copy…” button), an error message appears as well:

Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 660, in onCopyCalib
    self.onChangeCalibSelection(1, newCalibName)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\monitors\MonitorCenter.py", line 590, in onChangeCalibSelection
    self.ctrlScrPixHoriz.SetValue(locale.str(_sizePix[0]))
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 303, in str
    return format("%.12g", val)
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 196, in format
    return _format(percent, value, grouping, monetary, *additional)
  File "C:\Program Files (x86)\PsychoPy2\lib\locale.py", line 202, in _format
    formatted = percent % value
TypeError: float argument required, not NoneType

When closing the monitor center, it asks if I want to save the changes. If I choose “No”, the monitor center closes and can be opened again. However, if I click “Yes”, the monitor center closes and cannot be opened again (error message same as the first one).

The issue looks like something to do with a combination of things:

  • it 's trying to convert a value into you locale (e.g. 1.0 in the UK is written as 1,0 in France)
  • it looks like the specific value it has failed on is the size in pixels, which seems set to be None

So we should try to catch this as an error, but you can probably fix it by giving your monitor a valid size in pixels.

Could you:

  • upload the monitor calibration file here (in the data folder there’s abother folder called monitors and the calibration files are in there)
  • tell us what locale (language/country) your operating system is?

Thank you for the reply. About the locale, I have Czech Republic set as the region, the language is English (UK), decimals are written with a comma (eg. 73,8). Sadly, I am not authorized to upload the monitor calibration files, so I put them on my Google Drive. I included the files as they are before touching anything as well as from the point when the monitor center no longer works.

Giving my monitor a valid size in pixels is what I was originally trying to do and how I encountered the bug (or I’m just too stupid) - the original calibration thinks my monitor is 1024x768, whereas in reality it’s 1920x1080. Trying to alter these values and saving creates a bug (so does saving without altering anything, as posted above).

When trying to run any experiment with the bug, the following message appears:

Traceback (most recent call last):
  File "C:\Users\labsk\Desktop\cast2\Memory test\memorytest_lastrun.py", line 73, in <module>
    depth=-1.0);
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\text.py", line 154, in __init__
    self.setHeight(height, log=False)  # calls setFont() at some point
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\text.py", line 202, in setHeight
    setAttribute(self, 'height', height, log)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\attributetools.py", line 137, in setAttribute
    setattr(self, attrib, value)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\attributetools.py", line 27, in __set__
    newValue = self.func(obj, value)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\text.py", line 194, in height
    units=self.units, win=self.win)[1]
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\monitorunittools.py", line 82, in convertToPix
    return unit2pixFunc(vertices, pos, win)
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\monitorunittools.py", line 203, in cm2pix
    raise ValueError(msg % monitor.name)
ValueError: Monitor testMonitor has no known width in cm (SEE MONITOR CENTER)

The only thing I understand about this message is that the monitor size is not defined, however, before closing the monitor center, there was “30” set as the monitor width (by default). I feel that I’m missing some very trivial but crucial detail about how to use the monitor center properly.

What I want to accomplish is to display pictures with the correct size, but I can’t change any monitor specifications without encountering the bug. I already have a workaround - by changing the image size and using a ruler to see how big it gets on the screen.

On the other hand, I would love to be able to use the monitor center without bugs. If you suspect that the locale could play a role in this bug, I’m gonna try to change it in the system and see what happens. Thanks for any advice.

EDIT: Changed the decimal marker form a comma ( , ) to a dot ( . ) in Windows settings, the bug is still there - opening the monitor center, not changing anything and saving still causes the bug.

I had many issues with the Monitor center when I was trying to calibrate an unspecified (in the Preferences -> locale) but French Windows PC. Changing the locale to English US solved these issues.