HTLetterspacer script

Hello,
i recently bought glyphsapp, really enjoy it.
so after playing and starting some typefaces, i did installed HTLetterspacer for testing purpose.
it worked fine, i thought it made some good adjustments to my spacing, then worked a lot on the font.
add a second master, and thought it was time to use HTL again.

but it doesnt run anymore i get this in the macro window :

Start
Traceback (most recent call last):
  File "HT_LetterSpacer.py", line 8, in <module>
    import HT_LetterSpacer_script
  File "HT_LetterSpacer_script.py", line 22, in <module>
    from objectsGS import *
  File "GlyphsApp/objectsGS.py", line 12, in <module>
  File "ufoLib.py", line 38, in <module>
    from robofab.glifLib import GlyphSet, READ_MODE, WRITE_MODE
  File "glifLib.py", line 19, in <module>
    from robofab.pens.pointPen import AbstractPointPen
  File "pointPen.py", line 145, in <module>
    from fontTools.pens.basePen import AbstractPen
  File "__init__.py", line 1, in <module>
    from fontTools.misc.py23 import *
  File "__init__.py", line 3, in <module>
    from fontTools.misc.py23 import *
  File "py23.py", line 6, in <module>
    from contextlib import redirect_stderr, redirect_stdout
ImportError: cannot import name redirect_stderr
End

im using latest glyphs Version 2.6.1 (1230)
have no idea what changes i made since, i may have tried to install other scripts, not sure

Better open an issue in the LetterSpacer repository.

ok, thank you.
Will do this.
But im worried because I also installed kernkraft from the plugin manager, and its not there, even if it shows as installed in the manager.
so i removed it and installed it manually in the script folder. now i see the menu, but nothing, i just got a ’ start end ’ in the macro window.

When clicking on the install modules in the prefs/addons i get :
The modules could not be installed
Could not load the modules.

Kernkraft shows up in the Glyph menu after installation. Did you restart the app after you installed?

1 Like

my bad,
i didnt checked in the glyph menu, its there, thank you.

posted there, but

now everytime i open glyphs i get this :

 Traceback (most recent call last):
  File "main.py", line 17, in <module>
    _run('plugin.py')
  File "main.py", line 15, in _run
    exec(compile(source, script, 'exec'), globals(), globals())
  File "plugin.py", line 21, in <module>
  File "world.py", line 102, in <module>
    from robofab.objects.objectsRF import CurrentFont, CurrentGlyph, RFont, RGlyph, OpenFont, NewFont, AllFonts
  File "objectsRF.py", line 4, in <module>
    from robofab.objects.objectsBase import BaseFont, BaseKerning, BaseGroups, BaseInfo, BaseFeatures, BaseLib,\
  File "objectsBase.py", line 25, in <module>
    from robofab import ufoLib
  File "ufoLib.py", line 38, in <module>
    from robofab.glifLib import GlyphSet, READ_MODE, WRITE_MODE
  File "glifLib.py", line 19, in <module>
    from robofab.pens.pointPen import AbstractPointPen
  File "pointPen.py", line 145, in <module>
    from fontTools.pens.basePen import AbstractPen
  File "__init__.py", line 1, in <module>
    from fontTools.misc.py23 import *
  File "__init__.py", line 3, in <module>
    from fontTools.misc.py23 import *
  File "py23.py", line 6, in <module>
    from contextlib import redirect_stderr, redirect_stdout
ImportError: cannot import name redirect_stderr

and btw i removed HTletterspacer from the script folder.

This is not a LetterSpacer error. Seems to be one of the plug-ins you have installed.
Perhaps try reinstalling your modules?

ok thank you mekkablue,
i removed robofab, vanilla, fonttools. reinstalled them in the pref/modules.
same problem. So i removed one plugin after another, and closing/relaunched glyphs after each one.
Turn out it was kern-a-lytics causing this error message, so i got rid of it, + i dont need it.

Still no luck with HTLetterspacer tho, no idea what i did wrong to cause it not to work anymore.

I had same issues before about this, maybe it’s some kind of error in newest fontTools packages. So I downloaded and install the old version of fontTools here: https://pypi.org/project/fonttools/3.21.1/
and the hard way is copy the fontTools folder fonttools-3.21.1 > Lib > fontTools into Glyphs Script folder.
I hope it helps.

1 Like

it works, i did exactly that, installing the 3.21.1, and hard copy the folder into the fonttools fodler, and everything seems to works again, HTLetterspace at least is working again. thanks a lot gumpita!