psychopy.org | Reference | Downloads | Github

Standalone PsychoPy3 will not open

For some reason, my Computer (running on Windows 8.1) is unable to start the PsychoPy3 App although PsychoPy3 has been working perfectly for months. I searched through a lot of the threads on this website and tried several suggestions that have already been made. Unfortunately, nothing works so far. Here’s what I already did:

I ran the PsychoPy app with command prompt using the following line of code (as has been suggested for similar problems):

C:\Program Files (x86)\PsychoPy3>python.exe -m psychopy.app.psychopyApp

This yields the following error message:

File “C:\Program Files (x86)\PsychoPy3\lib\runpy.py”, line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, Error)
File “C:\Program Files (x86)\PsychoPy3\lib\runpy.py”, line 109, in get_module_details
import(pkg_name)
File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy_init
.py", line 44, in
from psychopy.preferences import prefs
File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences_init
.py", line 13, in
from . import preferences as prefsLib
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\preferences.py”, line 263, in
prefs = Preferences()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\preferences.py”, line 67, in init
self.loadAll()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\preferences.py”, line 166, in loadAll
self.appDataCfg = self.loadAppData()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\preferences.py”, line 220, in loadAppData
encoding=‘UTF8’, configspec=appDataSpec)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\configobj.py”, line 1229, in init
self._load(infile, configspec)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\configobj.py”, line 1318, in _load
raise error
configobj.ConfigObjError: Parsing failed with several errors.
First error at line 72.

I searched for some help concerning the configobj script but the only obvious reason for a crash seems to be using Python > 3.7 which i’m not. I’m using version 3.6.5. Also, I don’t see how I can get a more specific error message out of the configobj than the one posted above.

If anyone has any suggestions on how to solve this problem, I’d be very thankful!

Hi @joscha.dutli , have you tried the suggestions on the troubleshooting page?

Thanks a lot for the quick reply!

To be honest, I didn’t go through all the suggested steps as I thought that uninstalling and reinstalling PsychoPy would solve problems like cleaning preferences.
However, I took a closer look now and it seems like the problem is coming from the file appData.spec in the folder lib\site-packages\psychopy\app. The error message in my previous post leads to the following lines of code in the py-file preferences in lib\site-packages\psychopy\preferences:

appDataSpec = ConfigObj(join(self.paths[‘appDir’], ‘appData.spec’),
encoding=‘UTF8’, list_values=False)
cfg = ConfigObj(self.paths[‘appDataFile’],
encoding=‘UTF8’, configspec=appDataSpec)

Unfortunately, neither deleting the file appData.spec nor replacing it with the newest available version from here : https://github.com/psychopy/versions/tree/master/psychopy/app seems to solve the problem.

Thanks again for your answer and thanks for any further suggestions, if anything comes to mind!

PS The files named on the troubleshooting page (i.e. userPrefs.cfg and appData.cfg) don’t exist on my computer which I think makes sense as I reinstalled PsychoPy and wasn’t able to open it since.

Are you sure? PsychoPy always saves those files when you use the application, so if you’ve been using it a while those files should be there. Have you found the right folder?

Hi @jon, thanks for your answer!
You are right, I didn’t find the right folder. I found them now and deleting the appData.cfg file indeed solved the problem.

One reason I didn’t find the correct file was that the suggested code on the troubleshooting page, that is:

python -c “from psychopy import prefs; print(prefs.paths[‘userPrefsDir’])”

yielded the same error message as trying to start PsychoPy. The other reason is a lack of Windows experience, I guess, as I didn’t find the APPDATA folder which turned out to be exactly where it’s supposed to be according to the troubleshooting page.

Thanks @dvbridges and @jon for your help!