loicsander / Robofont-scripts

MIT License
68 stars 28 forks source link

ScaleFast 0.93.3: no window + traceback #20

Closed LaPolice closed 9 years ago

LaPolice commented 9 years ago

Hi Loïc,

This morning I wanted to give your ScaleFast extension a try. After opening two font files, I tried to launch the extension but nothing happens, no window appears. I get a the traceback, shall I email it to you or post it here? I'm using RF 1.7b (built 1507232110) with OS 10.9.5 I've read the issue "Scale Fast Extension not launching." opened on June 10.

Best,

Mathieu

loicsander commented 9 years ago

Hi Mathieu,

If you have a traceback, that’ll most certainly be helpful. You can post it here, thanks!

LaPolice commented 9 years ago

Hello Loïc,

Here's the traceback with the latest beta RF 1.7b (built 1507282329). I can revert to the previous built but the result is the same, the ScaleFast window doesn't show. Thanks for looking into this.

Traceback (most recent call last): File "scaleFast.py", line 1517, in File "scaleFast.py", line 376, in init File "scaleFast.py", line 906, in _selectedFontChanged File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 37, in getRefStems File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 86, in getSlantAngle File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 204, in getGlyphBox File "lib/fontObjects/robofabWrapper.pyc", line 2731, in draw File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 299, in draw File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 308, in drawPoints File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/component.py", line 107, in drawPoints File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/robofab/pens/adapterPens.py", line 111, in addComponent File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/fontTools/pens/basePen.py", line 195, in addComponent TypeError: 'NoneType' object has no attribute 'getitem'

loicsander commented 9 years ago

Okay, I tried fixing it, you can update and tell me if it works.

LaPolice commented 9 years ago

Thanks! Just tried the latest version: – ScaleFast window opens with newly created and unsaved font files – ScaleFast window doesn't open with previously saved font files and I get this traceback:

Traceback (most recent call last): File "scaleFast.py", line 1517, in File "scaleFast.py", line 376, in init File "scaleFast.py", line 906, in _selectedFontChanged File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 37, in getRefStems File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 90, in getSlantAngle File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 128, in removeOverlap TypeError: reduce() of empty sequence with no initial value

loicsander commented 9 years ago

Do you get the same result with any non-empty font?

LaPolice commented 9 years ago

Same result and but different tracebacks with two other fonts. I've also just realized that after launching RF, without any fonts open, I get this line in the Output Window: Deprecated: use 'buildAdditionContextualMenuItems'.

loicsander commented 9 years ago

This error remains mysterious to me.

It shouldn’t block higher processes so I added a fail-safe for now, we’ll see if it’s the only remaining error. I hope this will allow the extension to be launched without failing.

LaPolice commented 9 years ago

Thanks for giving it another try. Is it working on your side?

I've just tested with a few fonts, still no Fastscale window… Well, if this is just me, I can use UFOstretch instead. My idea was simply to test your extension more seriously with a small project. From the same files (issue posted two days ago), I've noticed this new line at the end: AttributeError: 'CollectSegmentsPen' object has no attribute 'glyphSet'

loicsander commented 9 years ago

I cannot reproduce the issue on my side and nobody has reported a similar issue (which doesn’t necessarily mean you’re the only one to experience it). But I never had that problem, so that’s why it’s hard to resolve the issue. I’ll keep on digging, though. : )

LaPolice commented 9 years ago

Merci for this new attempt, unfortunately still no window…

Traceback (most recent call last): File "scaleFast.py", line 1517, in File "scaleFast.py", line 376, in init File "scaleFast.py", line 906, in _selectedFontChanged File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 37, in getRefStems File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 94, in getSlantAngle File "/Users/mathieuchriste/Library/Application Support/RoboFont/plugins/ScaleFast.roboFontExt/lib/mutatorScale/utilities/fontUtils.py", line 146, in intersect File "lib/fontObjects/robofabWrapper.pyc", line 2731, in draw File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 299, in draw File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 308, in drawPoints File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/component.py", line 107, in drawPoints File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/robofab/pens/adapterPens.py", line 111, in addComponent File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/fontTools/pens/basePen.py", line 195, in addComponent TypeError: 'NoneType' object has no attribute 'getitem'

loicsander commented 9 years ago

Yes, the previous commit wasn’t complete, the last one has a better chance of being the right one.

LaPolice commented 9 years ago

Got it, just installed the latest commit and tested it. Damn, it still doesn't work on my side, sorry.

loicsander commented 9 years ago

Is the traceback the same as usual?

LaPolice commented 9 years ago

Thought so but after comparing the previous with the present/latest one, a few minor differences appear. Here's a screenshot of the latest traceback with differences highlighted in orange:

2015-08-06-scalefast-traceback-differences

loicsander commented 9 years ago

Something eludes me, it shouldn’t go to the point where it tries to draw the components.

loicsander commented 9 years ago

Thank you for your patience and testing ; )

LaPolice commented 9 years ago

Always a pleasure to contribute, testing is the least I can do as I'm not coding much anymore. Just installed 0.93.7, still no window. I compared the traceback with the previous one; identical.

LaPolice commented 9 years ago

Just installed 0.93.8, still no window. I compared the traceback with the previous one; identical.

LaPolice commented 9 years ago

Just installed 0.93.8, relaunched RF, window opens! Thanks Loïc for the technical support and guidance.

loicsander commented 9 years ago

You’re welcome!