3.1.2 and 3.2 won't start after GlyphsPython 3.11 update

Is there a way to stop plugins and modules from auto-updating? Cutting edge is now updating GlyphsPython to 3.11 which breaks BOTH versions, so I can no longer open Glyphs 3.1.2 or 3.2. I can fix it by deleting Repositories/GlyphsPythonPlugin, but it happens again if I run 3.2 and then later run 3.1.2.

Also, after I get it working again, it complains about many plugins crashing and I have to reinstall them all one by one.

In case it’s relevant I’m on Monterey 12.6.5

You shouldn’t need that. There should be a dialog with a ‘Ignore’ button. That is mostly the best option.

It wasn’t at all clear to me what would happen if I clicked “OK” versus “Ignore”, so I went with “OK”.

So is there a way to stop auto-updates on plugins and modules? Or is there a better way to manage stable and cutting edge together on the same machine?

I am struggling with the same issue. I have both 3.1.2 (3151) and 3.3 (3316) installed. 3.1.2 uses the Python 3.10.11 module installed through the plugin manager. Whenever I open 3.3, Python gets updated, breaking Glyphs 3.1.2.

I am forced to use 3.1.2 for working with some of my clients, while I use 3.3 form my own work. I waste at least 5 minutes of my time every time I find myself switching between the two versions.

Unless someone has some other solution to this issue, it would be great to either not have 3.3 automatically update the Python module, or otherwise allow for multiple Glyphs Python module versions to be installed, so we can choose which one is used for each version in the Addons section of the Settings.

Glyphs 3.3 should be able to work with the older Python version of 3.1

I know, and it was working without any issues a while ago. But at some point the Bleeding Edge versions of Glyphs started to auto-update the Python module, so even though I had Python 3.10.11 installed so it would work with Glyphs 3.1.2, now it automatically updates to Python 3.11.xx, which breaks the Python module for 3.1.2.

Basically, even though I install the Python module on Glyphs 3.1.2, which installs Python version 3.10.11, whenever I open Glyphs 3.3, the module gets updated, breaking Python for Glyphs 3.1.2

You can disable all automatic extension updates using the following setting key:

GSPluginManagerDisableAutomaticUpdates

Set this to YES using the mekkablueAppSet Hidden App Preferences script, or True using the following macro:

Glyphs.defaults["GSPluginManagerDisableAutomaticUpdates"] = True

That would be very difficult and I think allowing multiple Python installations for different app versions of the same major app version would cause more issues than it would solve.

1 Like

Thanks for explaining to me how to disable automatic extension updates. This will do as a (hopefully) temporary patch. It would be beneficial to find a way to deal with this situation in a more permanent way without compromising automatic updates fully. The reason why I find myself in this situation is not dissimilar to the reason why someone might have a requirements.txt file in a repo in order to manage Python library versioning.

Glyphs changes a lot, which is great, we all love cool new features, but it also means it can be quite unstable and buggy at times, even on Stable releases. So freezing which version is used for a given project can be extremely beneficial, especially when collaborating with others. I would love to be able to do that in an even more fine-grained way. If I could freeze modules and plugins to specific versions, I’d love that. I understand that can add a lot of complexity to the app. But I don’t believe I’m asking for something too dissimilar to what’s a fairly common and quite useful feature in software development in general.

In any case, thanks for your help Florian.

You can manually install Python (e.g. from python.ord) and select it in Preferences > Addons. You need to install pyobjc using pip to make it work in Glyphs. You can add multiple versions of Python at the same time (and even use them from the Terminal (pip3.12, python3.12). So after installing Python 3.10, do pip3.10 install pyobjc in Terminal.

1 Like

Hi Georg,

Thanks for the pointers, I appreciate the help. It took a bit of time, sorting out all the install issues for the different modules, but I managed to make Glyphs 3.1.2 work with Python 3.10.11 from Python.org.

The issue I am now encountering is that now Glyphs 3.1.2 and Glyphs 3.3 do not remember my preferred Python version for each of them. For Glyphs 3.3 I want to use the Python module that’s installable from the Plugin Manager, but when I install and pick that Python version in Glyphs 3.3 and then switch to Glyphs 3.1.2, the app opens with the Glyphs Python module instead of what I had chosen for it before (Python 3.10.11 from Python.org), and all the plugins crash. I then have to go to settings, change the Python module, close Glyphs 3.1.2, and then open it again.

Granted, the above is less tedious than having to reinstall the modules each time as I was doing before, but not by much. It still feels like a huge waste of time and makes switching between different versions of the app a lot less nimble than I wish it could be.

Is there a way to force them to remember my choice of Python for each of them?

While you can have different minor versions of the same app installed, they still share settings, including the Python installation. (This does not apply to major versions; Glyphs 2 and Glyphs 3 use separate settings).

You can launch an app with specific settings just for that run. In Terminal, this would look like so:

$ '/Applications/Glyphs 3.app/Contents/MacOS/Glyphs 3' -GSPythonFrameworkPath '/Users/YOUR_USER_NAME/Library/Application Support/Glyphs 3/Repositories/GlyphsPythonPlugin/Python.framework/Versions/3.11'

That would launch the specific app with one of the settings overwritten for the duration of this one app run. So, you can configure the Python that you need for Glyphs 3.3 and then create a script that launches Glyphs 3.1.2 with a different Python path, like so:

  1. Create a new plain text file. For example, use the TextEdit app, create a new document and ensure it is a plain document (Format → Make Plain Text).

  2. Write the following code:

    #!/bin/sh
    '/Applications/Glyphs 3.1.2.app/Contents/MacOS/Glyphs 3' -GSPythonFrameworkPath 'Path/to/Python'
    

    Here, Glyphs 3.1.2.app is the name of the Glyphs 3.1.2 app in your Applications folder. Change as needed. Path/to/Python is the full path to a Python installation as in the code example above.

  3. Save the file with a file name extension of .command.
    Something like “Glyphs 3.1.2.command

  4. Close the text editor. Now you can double-click the .command file and it will launch the specific Glyphs app with the Python path tailored as you need it to be.

Florian’s method is better, but in case you want to change something in the Glyphs preferences file via a shell script, you could do it with the plutil command.

Create a shell script called Change to Python 3.12 (Python.org).command

#!/bin/sh
plutil -replace GSPythonFrameworkPath -string "/Library/Frameworks/Python.framework/Versions/3.12" ~/Library/Preferences/com.GeorgSeifert.Glyphs3.plist

Create a shell script called Change to Python 3.11 (Glyphs).command

#!/bin/sh
plutil -replace GSPythonFrameworkPath -string "/Users/$USER/Library/Application Support/Glyphs 3/Repositories/GlyphsPythonPlugin/Python.framework/Versions/3.11" ~/Library/Preferences/com.GeorgSeifert.Glyphs3.plist

Do not use plutil; that is a blunt tool best reserved for other use cases. Instead, use the defaults tool:

defaults write com.GeorgSeifert.Glyphs3 KEY VALUE

Like:

defaults write com.GeorgSeifert.Glyphs3 GSPythonFrameworkPath "Some/Path"

Pro tip: See all currently set settings like so:

defaults read com.GeorgSeifert.Glyphs3
1 Like

An update on this topic. I’ve set up the whole thing following what’s been discussed above and it’s been working well enough for me. I made a little app with Platypus to run the bash script that opens Glyphs 3.1.2 using Phython 2.10.11 from Python.org, so I can have that on my Dock. It’s quite nice to not have to reinstall anything each time I switch app version, so thanks to everyone who contributed towards this solution.

1 Like

You mean 3.10.11?

And what keeps you using Glyphs 3.1.2?