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

This yields the following error message:

File “C:\Program Files (x86)\PsychoPy3\lib\”, 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\”, line 109, in get_module_details
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\”, line 263, in
prefs = Preferences()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\”, line 67, in init
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\”, line 166, in loadAll
self.appDataCfg = self.loadAppData()
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\preferences\”, line 220, in loadAppData
encoding=‘UTF8’, configspec=appDataSpec)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\”, line 1229, in init
self._load(infile, configspec)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\”, 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 : 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!

1 Like

Thanks, this just helped me resolve the same issue

This also solved it for me! For those who also aren’t Windows savvy (like me)- the AppData file exists outside of the psychopy folder. It took me a minute to find it (using the search function on windows). For me its exact path was Users/Display/AppData/Roaming/Psychopy3

Thanks to everyone who solved this!