Getting PsychoPy to load: The solution by @TarandeepKang solves the problem by not loading pyglet (which won’t be a solution in the long run). The pyglet team have posted some fixes to the top of their 1.5-maintenance branch and using that gets PsychoPy loading again without the hack to validators.
But the issue @walter raises, with CoreFoundation not being found, is the next one to crack. That occurs even if we try to launch a script that does nothing, so it seems to be something in the script-launching process within PsychoPy app
I have actually uploaded a testing release called 2020.2.7rc1 with the first step applied (where PsychoPy should launch but cant yet run scripts on Big Sur)
dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Referenced from: /Applications/PsychoPy.app/Contents/MacOS/python
Reason: image not found
because I’m getting that even if I launch a script that contains no pyglet calls (just print('hello'))
That was based on Python 3.8 installed from python.org so we might yet have trouble when we port that into the Standalone app bundle (which so far has been built on Py3.6) but fingers crossed it means we should be able to get something working soon!
OK, there’s now a test release availabe that I think works fine on Big Sur on everything except for the new TextBox (I have the fix for that implemented as well but it requires rebuilding the binaries)
Hopefully 2020.2.7 final will be out this afternoon with full Big Sur support back in
Eek. So I have some people doing a longitudinal training study (which is covering a significant period of time) that I created in PsychoPy v1.90.2. Someone’s just updated their OS to Big Sur and they’re now receiving the following error message:
Traceback (most recent call last):
File “/Users/username/Music/Current/Study/Experimentfolder/Experiment.py”, line 2, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/init.py”, line 26, in
from .text import TextStim
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/text.py”, line 28, in
import psychopy.event
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/event.py”, line 63, in
from pyglet.window.mouse import LEFT, MIDDLE, RIGHT
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/window/init.py”, line 1896, in
gl._create_shadow_window()
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/init.py”, line 384, in getattr import(import_name)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/init.py”, line 100, in
from pyglet.gl.lib import GLException
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/lib.py”, line 141, in
from pyglet.gl.lib_agl import link_GL, link_GLU, link_AGL
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/lib_agl.py”, line 49, in
framework=’/System/Library/Frameworks/OpenGL.framework’)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/lib.py”, line 118, in load_library
return self.load_framework(kwargs[‘framework’])
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/lib.py”, line 286, in load_framework
raise ImportError(“Can’t find framework %s.” % path)
ImportError: Can’t find framework /System/Library/Frameworks/OpenGL.framework.
As mentioned in the thread above, the issue seems to be with Pyglet and OpenGL. Can anyone recommend a potential way to fix this in such an old version of PsychoPy?
But I’m not sure what the equivalent file for ‘visual/textbox2/textbox2.py’ would be? The textbox folder (there isn’t a textbox2 folder) contains only:
psychopy/visual/init.py has very similar code to that in Jon’s example, whereas
visual/textbox/fontmanager.py is quite different:
import math
import numpy as np
import unicodedata as ud
from matplotlib import font_manager
from psychopy.core import getTime
from .textureatlas import TextureAtlas
from pyglet.gl import (glGenLists, glNewList, GL_COMPILE, GL_QUADS,
glBegin, glTexCoord2f, glVertex2f, glEnd, glDeleteLists,
glEndList, glTranslatef, glDeleteTextures)
Just to add to this… I know that in general it’s preferred if people continually update their code to the most recent version of PsychoPy, but at the time I wrote it my code worked best in 1.90.2 (which is to say that it didn’t run at all in 1.90.3) so I stuck with it. It’s a several month-long training scheme, with several twists and turns, so not the simplest thing to just update (well, not for me anyway). By this point I’ve had participants taking the training for my experiment for a great deal of time using their own downloaded copies of 1.90.2, so it’s neither easy nor practical for me to have to update the whole lot (although rest assured, I’d write any future experiments in the most up-to-date PsychoPy version). As such, some thoughts on how to save it from the perils of Big Sur would be greatly appreciated if at all possible… thanks
Hi @Jon
Just downloaded the 2020.2.10 release standalone and installed on my Mac with Big Sur 11.1
Alas, it does not start and shows a PsychoPy error instead.
Any more leads on this?
Thanks!
Marc
Error messages contain text that is essential to working out what’s going on. If you don’t tell us what the error message was (all of it) then we really can’t help
OK, thanks. That’s not very helpful of Big Sur then!
I wonder if any useful information was stored in the log file. Could you go to a terminal window and run:
cat ~/.psychopy3/last_app_load.log
Maybe that will give us some clues. Otherwise I’m at a loss how to help right now
Thanks @Jon. I’m struggling a bit. When I open a Terminal and copy and paste the command I get " No such file or directory" I then tried a few things including to navigate to the top level and into the Applications directory where PsychoPy3.app lives. I also changed the spelling from psychopy3 to PsychoPy3 but I always get the same error/
Sorry, I am not too familiar with terminal so I’m probably missing something trivial.
Can you suggest what else I could try to make the command work?
~ is your user folder (also called your home folder). If you are more comfortable using the Mac Finder than the Terminal, then select “Home” from the “Go” menu. Push CMD + SHIFT + . to see invisible files (files or folders that start with a . are normally invisible). At the top level of your user folder, you should now see a folder called .psychopy3, which should contain that log file.