unified-font-object / ufoNormalizer

A tool that will normalize the XML and other data inside of a UFO.
Other
51 stars 19 forks source link

Parsing error #21

Closed MrBrezina closed 8 years ago

MrBrezina commented 8 years ago
Traceback (most recent call last):
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/bin/ufonormalizer", line 9, in <module>
    load_entry_point('ufonormalizer==0.1', 'console_scripts', 'ufonormalizer')()
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 58, in main
    normalizeUFO(inputPath, outputPath=outputPath, onlyModified=onlyModified)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 179, in normalizeUFO
    normalizeFontInfoPlist(ufoPath, modTimes)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 459, in normalizeFontInfoPlist
    _normalizePlistFile(modTimes, ufoPath, "fontinfo.plist", preprocessor=_normalizeFontInfoGuidelines)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 440, in _normalizePlistFile
    data = subpathReadPlist(ufoPath, *subpath)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 2921, in subpathReadPlist
    return _readPlistFromBytes(text)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/site-packages/ufonormalizer-0.1-py2.7.egg/ufonormalizer.py", line 99, in _readPlistFromBytes
    return plistlib.readPlistFromString(data)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/plistlib.py", line 103, in readPlistFromString
    return readPlist(StringIO(data))
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/Users/davidbrezina/bin/FDK/Tools/osx/Python/Current/lib/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
anthrotype commented 8 years ago

I think this one was failing because of a previous aborted normalization which might have left some broken plist files (perhaps aborted because of the same string encoding issue #19). If you git checkout -- . and retry with the new #23 patch that was just merged you should be fine.

MrBrezina commented 8 years ago

Yep, I can confirm this is ok now and the #19 is also fixed. Grazie!