Skateboard issue – designspace loading as noneType
ThunderNixon last edited by gferreira
I've just gotten Skateboard 1.0 and opened it up, and I'm having an error when I try to load a designspace file by clicking the "open" button. Here's what I get in the Output Window:
Traceback (most recent call last): File "lib/doodleDelegate.pyc", line 97, in sendEvent_ File "/Applications/RoboFontBeta3.2b.app/Contents/Resources/lib/python3.6/vanilla/vanillaWindows.py", line 496, in windowDidBecomeMain_ self._alertBindings("became main") File "/Applications/RoboFontBeta3.2b.app/Contents/Resources/lib/python3.6/vanilla/vanillaWindows.py", line 467, in _alertBindings return callback(self) File "skateboard.py", line 2992, in mainWindow_becameMain File "skateboard.py", line 2762, in document_updateCurrentDesignSpace File "skateboard.py", line 2877, in document_checkFonts File "genericpath.pyc", line 19, in exists TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
I've also received this similar error:
Skateboard: Failed to open the document /Users/stephennixon/type-repos/route-project/route.designspace Traceback (most recent call last): File "skateboard.py", line 4574, in mainWindow_openDocumentWithPath File "skateboard.py", line 2877, in document_checkFonts File "genericpath.pyc", line 19, in exists TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
That's all in the Output Window. If I try to click the "Debugs" button of Skateboard, nothing happens, but I get this in the Output Window:
Skateboard: Ironically, can't open the debug window because of a problem. Traceback (most recent call last): File "skateboard.py", line 2961, in debug_makeObjectBrowserCallback File "skateboard.py", line 2961, in <listcomp> AttributeError: 'NoneType' object has no attribute 'path'
I like the humor in the last error message, at least. :D
It doesn't really affect things if I restart RoboFont, and it doesn't have any affect if I edit the designspace file.
If there's anything I should try, I'd appreciate any pointers. (And actually, I'll take a couple minutes to restart my computer right now, then report back if that changes anything...).
Update: I've restarted my computer. No luck.
macOS Mojave v 10.14.2
RoboFont Version 3.2b (built 1809041630)
Note: I have recently been fixing some issues with how I set up my local python3 and pip, so there's a possibility that is part of this problem ... but I'm not sure whether that is interacting with RoboFont/Skateboard. I did also have an issue calling defcon from glyphsLib earlier in the day, so there may be bigger problems afoot. However, I have also been fine in installing and working with several things, so my python isn't completely hosed. I just didn't want to leave out that potential context in case it could be relevant, as my issue might be some kind of edge case.
erik last edited by
@ThunderNixon Looks like one of the masters ends up without a path. From that line I'm afraid I can't tell how that happened. Are all masters in the right place? Can you open the masters in RF?
ThunderNixon last edited by
Thanks for such a speedy reply, @erik!
I mistakenly took the error message to mean that the
.designspacepath couldn't be resolved, but your comment made me open another designspace (IBM Plex Sans) to check how things were looking. Sure enough, that worked perfectly.
I compared the syntax of the two designspaces ... and sure enough, I had messed mine up: In the
<instance>element, I had a
fileattribute – rather than the necessary
I had straight-up misread the spec on GitHub (LettError/designSpaceDocument).
A small question this leads me to ... is there any good "boilerplate" designspace doc I could grab to start the next project from? I realize the challenge there might be including everything that different people wanted to include, but even so, if there were a simple example complete with an axis, two sources, and three instances, it might be a nice starter to copy-paste from, and help people avoid future syntax issues.
Of course, I could just make this as a GitHub Gist, too, if you don't know of something like that off-hand.
erik last edited by erik
@ThunderNixon I'm happy to hear you found the problem. Skateboard doesn't validate the XML (yet - maybe it should, I'll make a note). Please note the designspace file spec moved to the fonttools. You can find it fonttools/Doc/source/designspaceLib/
Personally I try to avoid writing the xml by hand (situation, preference and external factors permitting of course) and prefer to write small scripts using designspacelib or ufoprocessor. While the script might be just as verbose as the resulting xml, I find a script to be more explicit. Here's a page on scripting designspace files