Psychopy on Big Sur on mac

Hi Marc,

I am having a very similar problem but was getting this error:
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/projects/pavlovia.py”, line 1049, in getGitRoot
File “subprocess.pyc”, line 356, in check_output
File “subprocess.pyc”, line 438, in run
subprocess.CalledProcessError: Command ‘[‘git’, ‘branch’, ‘—show-current’]’ returned non-zero exit status 129.

So I used the advice to delete the userpref and appdata files given as a solution here:
https://www.psychopy.org/troubleshooting.html#cleaning-preferences-and-app-data

I have also removed old versions of Psychopy, restarted my mac then reinstalled the latest version.

However I am still getting this error.

I’m not sure what else to try. Any advice on how you deleted the previous versions of Psychopy (I made sure I deleted them and removed them from trash). My traceback is slightly different to yours so I will keep looking into it but any tips would be greatly appreciated.

1 Like

Hi Lucy i have done the same thing and getting the same error

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1325, in onPavloviaSync
retVal = pavlovia_ui.syncProject(parent=self, project=self.project)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1416, in project
elif self.filename and pavlovia.getProject(self.filename):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1068, in getProject
gitRoot = getGitRoot(filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\projects\pavlovia.py”, line 1049, in getGitRoot
cwd=str§).decode(‘utf-8’):
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 336, in check_output
**kwargs).stdout
File “C:\Program Files\PsychoPy3\lib\subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘git’, ‘branch’, ‘–show-current’]’ returned non-zero exit status 129.

i deleted the versions file and restarted my computer and nothing helped

Hi,
I am looking into trying this on another another machine and then asking for help in another forum post. I will see what I can find.

@Lucy this is something I’ve worked out and can fix. Will have a fixed version for you today

1 Like

Thanks very much @jon :slight_smile:

I experienced compatibility issues as well in a MacOs BigSur Version 11.4 and the solutions provided so far didn’t worked for me… here are the steps that I followed to made the application launch correctly.

First verify that you have installed python 3.6.8 for Mac and that when you type in Terminal

python --version
your output is Python 3.6.8
if doesn’t show up and you are sure you installed type this to know any other version of python in your system
% ls -l /usr/local/bin/python*
This will result in the list of all python installations in your system, then erase those that you don’t need using
% sudo rm -rf “/Applications/Python3.7”
and set your default to 3.6.8 (likely to be done like follows but the installation of the corresponding python version will suffice)
% sudo ln -s /usr/local/bin/python3.6.8 /usr/local/bin/python

Second verify your pip installation, it has to be linked to this python 3.6 version such that typing in terminal the following will return

pip --version
pip 21.1.2 from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3/6…

Third install tables

pip install tables

Then install Psychopy using pip

pip install PsychoPy

Finally run PsychoPy from the terminal using

psychopy

Hi Jon! Just wanted to reiterate what everybody else said - THANK YOU! Your support has been hugely helpful.

1 Like

HI all,

After some time away from science, I looked forward to building some experiments.
Alas, PsychoPy again doesn’t work for me on Big Sur.
I deleted the old install, downloaded the latest Stand Alone.
while PsychoPy launches OK, any new script I create in Builder crashes.
I wanted to attach the crash report, but it is too long to be allowed and I cannot seem to upload text files

Any ideas @jon ?

Thank you so much!
Marc

Sorry about that - I think this one isn’t actually a Big Surr issue per se but a bug in the version of the psychtoolbox library we’re supplying. I’m working on a fix. The 2021.1.4 version should work for you I believe just not 21.2.0

1 Like

Thanks @Jon – the older version works!

Thanks Jon, for the speedy fix to the Big Sur Gatekeeper/psychtoolbox issue. At least it’s comforting that MacOS tries to protect the user from rogue third-party software. Keep up the great work! Lew

"PsychoPy[14971]: getattrlist failed for /System/Library/Extensions/AppleIntelKBLGraphicsGLDriver.bundle/Contents/MacOS/AppleIntelKBLGraphicsGLDriver: #2: No such file or directory"

This error may be accurate - the only file inside that path is “libigdmd.dylib”

"PsychoPy[14971]: getattrlist failed for /System/Library/Frameworks/OpenGL.framework/Resources//GLRendererFloat.bundle/GLRendererFloat: #2: No such file or directory"

First, note the double slash in the path. Second, on my macOS 11.6.4 (2018 MacBook Pro) the file “GLRendererFloat.bundle” is zero bytes.

I understand that OpenGL is deprecated in Big Sur, steering developers toward Metal. But OpenGL should work on my laptop… v4.1.

I have tried installing via pip, via brew, and standalone, including a couple legacy versions. I’m going to try 2021.1.4 per Jon’s request shortly…

Hope these details help! I too get the popup “Console” or “Terminate” and when I go to Console it’s empty. Bit if I filter for “PsychoPy” in the logs, this is what appears!

  • J

I tried v2021.1.4 with the same result. - J

You say this is happening with the Standalone distribution? I’ve installed that on numerous machines without problem. My own laptop is a Big Sur macbook so I don’t think it’s somethign about Big Sur per se :thinking:

Is there no error in PsychoPy itself? The app isn’t launching at all? Could you go to the terminal and run this to see if there’s anything useful stored there?

cat ~/.psychopy3/last_app_load.log

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/boot.py”, line 197, in
_run()
File “/Applications/PsychoPy.app/Contents/Resources/boot.py”, line 166, in _run
exec(compile(source, path, “exec”), globals(), globals())
File “/Applications/PsychoPy.app/Contents/Resources/psychopyApp.py”, line 102, in
main()
File “/Applications/PsychoPy.app/Contents/Resources/psychopyApp.py”, line 98, in main
start_app()
File “/Applications/PsychoPy.app/Contents/Resources/psychopyApp.py”, line 26, in start_app
app = startApp(showSplash=showSplash)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/init.py”, line 63, in startApp
from psychopy.app._psychopyApp import PsychoPyApp
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/_psychopyApp.py”, line 21, in
from . import themes
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/themes/init.py”, line 1, in
from ._themes import ThemeMixin, IconCache
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/themes/_themes.py”, line 18, in
from …experiment import components
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/experiment/init.py”, line 20, in
from .components import getInitVals, getComponents, getAllComponents
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/experiment/components/init.py”, line 17, in
from ._base import BaseVisualComponent, BaseComponent
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/experiment/components/_base.py”, line 19, in
from psychopy.alerts import alerttools
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/alerts/alerttools.py”, line 9, in
from psychopy.visual.textbox2.fontmanager import FontManager
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/init.py”, line 38, in
from .textbox2.textbox2 import TextBox2
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/textbox2/init.py”, line 4, in
from .textbox2 import TextBox2, allFonts
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/textbox2/textbox2.py”, line 34, in
allFonts = FontManager()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/textbox2/fontmanager.py”, line 727, in init
self.updateFontInfo(monospaceOnly)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/textbox2/fontmanager.py”, line 956, in updateFontInfo
fonts_found = findFontFiles()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/visual/textbox2/fontmanager.py”, line 670, in findFontFiles
fontPaths.extend(thisFolder.rglob("*.{}".format(thisExt)))
File “pathlib.pyc”, line 1152, in rglob
File “pathlib.pyc”, line 499, in select_from
File “pathlib.pyc”, line 1422, in is_dir
File “pathlib.pyc”, line 1198, in stat
PermissionError: [Errno 13] Permission denied: ‘/opt/local/share/fonts’
0.5233 DEBUG Opening message catalog /Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/localization/…/app/locale/en_US/LC_MESSAGE/messages.mo for locale en_US

Thanks @blue-j that’s more informative. I’ve never seen this error before but it looks like you’re using MacPorts (or maybe Homebrew, although I think that uses /opt/homebrew instead of /opt/local now) and it’s installed some additional fonts but, for some reason, that fonts folder doesn’t have the read permissions. It seems that would make it rather pointless as a “share fonts” folder :laughing: but I don’t know enough about MacPorts to know if there’s a reason for this.

That would explain why this particular error hasn’t been reported by others - they either don’t have /opt/local/share/fonts or they have it but they have read permission to it.

Some workarounds (in order of “correctness”):

  • We/you can add some error checking code to fontmanager.py to detect the permissions error and just not provide those fonts, rather than crashing out, as below. This is what we’ll do going forwards (I’m about to release 2022.1.1 and it won’t be in that but we’ll make sure it’s int he next release after), but may not be the easiest solution for you right now depending on how confident you are going under the hood
  • You could comment out that folder as one of the search options (see the definition of _OSXFontDirectories at the top of fontmanager.py)
  • You could look into the permissions of your /opt/local/share/fonts folder and make sure it can be read by the current user.

Adding a try…except call around the font-searching code (around line 670 in fontmanager.py) would look like this:

    for thisFolder in searchPaths:
        thisFolder = Path(thisFolder)
        try:
            for thisExt in supportedExtensions:
                if recursive:
                    fontPaths.extend(thisFolder.rglob("*.{}".format(thisExt)))
                else:
                    fontPaths.extend(thisFolder.glob("*.{}".format(thisExt)))
        except PermissionError:
            logging.warning(f"The fonts folder '{thisFolder}' exists but the current user doesn't have read "
                            "access to it. Fonts from that folder won't be available to TextBox")

Actually there is no such path on my machine! It stops at /opt/local

I use Homebrew exclusively, but it installs at /usr/local actually

So I sudo mkdir share and fonts… sudo chmod 777 that path… and … JOY!

Homebrew for Intel uses /usr/local. Homebrew for ARM use /opt/homebrew

On an M1 Mac, you can have both versions of Homebrew installed concurrently and this folder distinction is great because it stops libraries of the same name but different architecture interfering with each other, but is also tricky to get your head around at first.

This may not fix all such problems, but if you haven’t already, then add psychopy as a program with full HD access in security/privacy so that it has permission to create fodlers and files