dfrankland / font-family-merger

Merge font variations together to make a big, happy, font family!
27 stars 4 forks source link

Exception thrown by FontTools #5

Open pointydev opened 6 years ago

pointydev commented 6 years ago

Hey there,

Just got this exception after running py -2 font_family_merger.py, halp?

Current version of this script Python 2.7 BS4 4.6.0 FontTools 3.16.0 lxml 4.1.0

Dumping "Uni Sans Bold Italic.ttf" to "Uni Sans Bold Italic.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'hmtx' table...
Dumping 'cmap' table...
Dumping 'fpgm' table...
Dumping 'prep' table...
Dumping 'cvt ' table...
Dumping 'loca' table...
Dumping 'glyf' table...
Dumping 'kern' table...
ERROR: Unhandled exception has occurred
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\fontTools\ttx.py", line 389, in main
    process(jobs, options)
  File "C:\Python27\lib\site-packages\fontTools\ttx.py", line 363, in process
    action(input, output, options)
  File "C:\Python27\lib\site-packages\fontTools\misc\loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "C:\Python27\lib\site-packages\fontTools\ttx.py", line 260, in ttDump
    newlinestr=options.newlinestr)
  File "C:\Python27\lib\site-packages\fontTools\ttLib\__init__.py", line 313, in saveXML
    self._tableToXML(tableWriter, tag, progress)
  File "C:\Python27\lib\site-packages\fontTools\ttLib\__init__.py", line 331, in _tableToXML
    table = self[tag]
  File "C:\Python27\lib\site-packages\fontTools\ttLib\__init__.py", line 421, in __getitem__
    tableClass = getTableClass(tag)
  File "C:\Python27\lib\site-packages\fontTools\ttLib\__init__.py", line 831, in getTableClass
    module = getTableModule(tag)
  File "C:\Python27\lib\site-packages\fontTools\ttLib\__init__.py", line 813, in getTableModule
    __import__("fontTools.ttLib.tables." + pyTag)
  File "C:\Python27\lib\site-packages\fontTools\ttLib\tables\_n_a_m_e.py", line 26, in <module>
    nameRecordSize = sstruct.calcsize(nameRecordFormat)
  File "C:\Python27\lib\site-packages\fontTools\misc\sstruct.py", line 108, in calcsize
    return struct.calcsize(formatstring)
TypeError: Struct() argument 1 must be string, not unicode
(Hit any key to exit)
Exception TypeError: "'NoneType' object is not callable" in <function _removeHandlerRef at 0x0000000002A97BA8> ignored

My directory I'm running in, just in case that's useful:

15/10/2017  17:59             7,391 font_family_merger.py
01/03/2015  12:23           147,552 Uni Sans Bold Italic.ttf
01/03/2015  12:23           141,908 Uni Sans Bold.ttf
01/03/2015  12:23           149,068 Uni Sans Book Italic.ttf
01/03/2015  12:23           142,808 Uni Sans Book.ttf
01/03/2015  12:23           184,088 Uni Sans Heavy Italic.ttf
01/03/2015  12:23           149,584 Uni Sans Heavy.ttf
01/03/2015  12:23           148,200 Uni Sans Italic.ttf
01/03/2015  12:23           150,256 Uni Sans Light Italic.ttf
01/03/2015  12:23           143,368 Uni Sans Light.ttf
01/03/2015  12:23           147,924 Uni Sans SemiBold Italic.ttf
01/03/2015  12:23           142,180 Uni Sans SemiBold.ttf
01/03/2015  12:23           150,584 Uni Sans Thin Italic.ttf
01/03/2015  12:23           144,132 Uni Sans Thin.ttf
01/03/2015  12:23           144,032 Uni Sans.ttf

Thanks, Pointy

dfrankland commented 6 years ago

Hey there! Sorry, I don't think that I can help with this one 😞 I am not too sure what the error is caused by.