WoLiBaFoNaGen icon indicating copy to clipboard operation
WoLiBaFoNaGen copied to clipboard

Crash in Glyphs 3

Open weiweihuanghuang opened this issue 1 year ago • 4 comments

I get this crash on opening GA 3.2 (3179)

A plugin caused a crash

The Plugin WoLiBaFoNaGen.glyphsPlugin has caused a crash. Please update it by opening the Plugin Manager or re-downloading it from the original source.

Details:
Traceback (most recent call last):

  File "GlyphsApp/GlyphsApp/plugins.py", line 860, in loadPlugin

  File "plugin.py", line 73, in start
    self.load_defaults()

  File "plugin.py", line 115, in load_defaults
    setattr(self.fng, k, saved or v)

  File "FontNameGenerator.py", line 77, in word_list
    self.load_wordlist()

  File "FontNameGenerator.py", line 160, in load_wordlist
    with codecs.open(str(file_path), "rb", "utf-8") as txt_file:

  File "codecs.py", line 905, in open
    file = builtins.open(filename, mode, buffering)

FileNotFoundError: [Errno 2] No such file or directory: '~/Library/Application Support/Glyphs 3/Repositories/WoLiBaFoNaGen/WoLiBaFoNaGen.glyphsPlugin/wordsEn.txt'

App:3.2-3180 Plugin:2.0.1-201 System:11.6.1

Seems like it can't find it's own folder correctly

weiweihuanghuang avatar Mar 02 '23 00:03 weiweihuanghuang

Interesting! What kind of Python are you using, from python.org or from the Glyphs Plugin Manager?

jenskutilek avatar Mar 02 '23 13:03 jenskutilek

So in the Settings > Addons, I have 3.9.15 (Homebrew), but interestingly when I get the sys.executable inside Glyphs App's macro panel I get /Applications/Glyphs 3.app/Contents/MacOS/Glyphs 3

weiweihuanghuang avatar Mar 02 '23 22:03 weiweihuanghuang

The path to the text files is different when the script is run inside the Glyphs plugin vs. the standalone app. With your Python version, apparently the detection is wrong. Could you post the output of this script in Glyphs?

import sys
print(hasattr(sys, "frozen"))

jenskutilek avatar Mar 03 '23 18:03 jenskutilek

I get True

weiweihuanghuang avatar Mar 06 '23 04:03 weiweihuanghuang

It may work better now with the latest release, I've improved the code to find the word list folder.

jenskutilek avatar Jun 19 '24 12:06 jenskutilek