Is that some bug?

On version 2.4.2 (1060) upon opening the application I get the following message in the macro window:

__context <module ‘drawBot.context’ from ‘/Users/Kostas/Library/Application Support/Glyphs/Plugins/DrawBot.glyphsPlugin/Contents/Resources/drawBot/context/init.pyc’>
__sys.path[0] /Users/Kostas/Library/Application Support/Glyphs/Plugins/SpeedPunk.glyphsTool/Contents/Resources
Traceback (most recent call last):
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/NotePalettes/GlyphNote.glyphsPalette/Contents/Resources/…/MacOS/main.py”, line 11, in
_run(‘plugin.py’)
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/NotePalettes/GlyphNote.glyphsPalette/Contents/Resources/…/MacOS/main.py”, line 9, in _run
execfile(path, globals(), globals())
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/NotePalettes/GlyphNote.glyphsPalette/Contents/Resources/plugin.py”, line 15, in
class GlyphNote (PalettePlugin):
objc.error: GlyphNote is overriding existing Objective-C class
Traceback (most recent call last):
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/ShowOffsetCurveParameterPreview/OffsetPreview.glyphsReporter/Contents/Resources/boot.py”, line 47, in
_run(‘OffsetPreview.py’)
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/ShowOffsetCurveParameterPreview/OffsetPreview.glyphsReporter/Contents/Resources/boot.py”, line 45, in _run
execfile(path, globals(), globals())
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/ShowOffsetCurveParameterPreview/OffsetPreview.glyphsReporter/Contents/Resources/OffsetPreview.py”, line 18, in
class OffsetPreview ( NSObject, GlyphsReporterProtocol ):
objc.error: OffsetPreview is overriding existing Objective-C class
Traceback (most recent call last):
File “/Users/Kostas/Library/Application Support/Glyphs/Repositories/ShowRotated/ShowRotated.glyphsReporter/Contents/Resources/boot.py”, line 47, in
_run(‘plugin.py’)
File “/Users/Kostas/Library/Application Support/Glyphs/Repositories/ShowRotated/ShowRotated.glyphsReporter/Contents/Resources/boot.py”, line 45, in run
execfile(path, globals(), globals())
File “/Users/Kostas/Library/Application Support/Glyphs/Repositories/ShowRotated/ShowRotated.glyphsReporter/Contents/Resources/plugin.py”, line 19, in
class ShowRotated(ReporterPlugin):
objc.error: ShowRotated is overriding existing Objective-C class
Traceback (most recent call last):
File “GlyphsApp/plugins.py”, line 1149, in drawBackgroundForLayer_options

File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/Show-Rotated/ShowRotated.glyphsReporter/Contents/Resources/plugin.py”, line 138, in background
self.drawRotated( layer )
File “/Users/Kostas/Library/Application Support/Glyphs/Plugins/Show-Rotated/ShowRotated.glyphsReporter/Contents/Resources/plugin.py”, line 86, in drawRotated
pathA = thisBezierPathWithComponent.copy()
AttributeError: ‘NoneType’ object has no attribute ‘copy’

Adding here as there may be some relation.

I’m also having an issue when opening a Glyphs file from the command line when the application is not yet open. Import and Attribute errors are plenty, and no plugins load. Same issue on two machines, so i’m assuming its not something messed up in my Python installation. Happy to send necessary info if you need it.

Can you uninstall and reinstall plugins? And make sure you do not have double installations, perhaps in a different application support folder.

The error messages seem to point to a problem in the ‘Show Rotated’ plugin.

I re-installed everything and the messages have gone.

The only one that’s there now is this:
__sys.path[0] /Users/Kostas/Library/Application Support/Glyphs/Plugins/SpeedPunk.glyphsTool/Contents/Resources

Thats written in it appears.

I’ve just cleaned up installs and still having issues when launching from the command line. Even print Glyphs gives me the following:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/usr/local/lib/python2.7/site-packages/objc/__init__.py", line 18, in <module>
    _update()
  File "/usr/local/lib/python2.7/site-packages/objc/__init__.py", line 15, in _update
    import objc._objc as _objc
AttributeError: 'module' object has no attribute '_objc'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Glyphs' is not defined

I can’t run a clean install to rule out issues at the moment. It’s not a major workflow issue atm.

The Glyphs python API is not available in the command line like this. I’m preparing an example script that shows how to control Glyphs from outside of the app itself.

2 Likes

That would be great Georg, thanks.

Though, just to make sure we’re on the same page; the above code is from Glyph’s macro window after starting Glyphs at the cmd line with opening a file with `open *.glyphs’. Should this still cause an issue with loading the Python API within the actual application on initialisation?

I indeed was confused about where the script was run. But trying what you describe does work fine for me. Maybe the open command picks a very old version of Glyphs?