のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

TypeError: toXML() takes exactly 3 arguments (4 given)

Windowsでttxを実行したら以下のエラーになった。
ttxはV2.4。

d:\Python27\Scripts>python ttx Roboto-Regular.ttf

Dumping "d:\Roboto-Regular.ttf" to "d:\Roboto-Regular.ttx"...
Dumping 'GlyphOrder' table...
Dumping 'head' table...
Dumping 'hhea' table...
Dumping 'maxp' table...
Dumping 'OS/2' table...
Dumping 'hmtx' table...
Dumping 'VDMX' table...
Dumping 'cmap' table...
Dumping 'loca' table...
Dumping 'glyf' table...
Traceback (most recent call last):
  File "D:\Python27\lib\site-packages\FontTools\fontTools\ttx.py", line 303, in main
    process(jobs, options)
  File "D:\Python27\lib\site-packages\FontTools\fontTools\ttx.py", line 288, in process
    action(input, output, options)
  File "D:\Python27\lib\site-packages\FontTools\fontTools\ttx.py", line 180, in ttDump
    disassembleInstructions=options.disassembleInstructions)
  File "D:\Python27\lib\site-packages\FontTools\fontTools\ttLib\__init__.py", line 267, in saveXML
    self._tableToXML(tableWriter, tag, progress)
  File "D:\Python27\lib\site-packages\FontTools\fontTools\ttLib\__init__.py", line 301, in _tableToXML
    table.toXML(writer, self, progress)
TypeError: toXML() takes exactly 3 arguments (4 given)
(Hit any key to exit)
D:\Python27\Lib\site-packages\FontTools\fontTools\ttLib\__init__.py

def _tableToXML(self, writer, tag, progress):
		if self.has_key(tag):
			table = self[tag]
			report = "Dumping '%s' table..." % tag
		else:
			report = "No '%s' table found." % tag
		if progress:
			progress.setLabel(report)
		elif self.verbose:
			debugmsg(report)
		else:
			print report
		if not self.has_key(tag):
			return
		xmlTag = tagToXML(tag)
		if hasattr(table, "ERROR"):
			writer.begintag(xmlTag, ERROR="decompilation error")
		else:
			writer.begintag(xmlTag)
		writer.newline()
		if tag in ("glyf", "CFF "):
			table.toXML(writer, self, progress) <===ここかな?
		else:
			table.toXML(writer, self)
		writer.endtag(xmlTag)
		writer.newline()
		writer.newline()
Globals Global variables
progress NoneType: None
report str: Dumping 'glyf' table...
self TTFont:
table DefaultTable: <'glyf' table at 2db2cc8>
tag str: glyf
writer XMLWriter:
xmlTag str: glyf