rjames86 / textexpander_to_keyboardmaestro

25 stars 8 forks source link

Error while parsing a .plist #2

Closed mcfoton closed 8 years ago

mcfoton commented 8 years ago

Hi and thanks for all the work! Tried to run, got an error

Traceback (most recent call last): File "TE.py", line 274, in main() File "TE.py", line 254, in main text_expanders = parse_textexpander() File "TE.py", line 244, in parse_textexpander pl = plistlib.readPlist(xml_file) File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist rootObject = p.parse(pathOrFile) File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse parser.ParseFile(fileobj) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 145, column 11

.plist is here: https://cl.ly/0G0K3r15413y

Any ideas?

rjames86 commented 8 years ago

What version of TextExpander are you running? that doesn't look like a v5+ settings file

mcfoton commented 8 years ago

It's 5.1.4 Maybe that has something to do with non-latin characters?

rjames86 commented 8 years ago

Actually it doesn't look to be the characters causing the problem. In one of your groups, you have the following snippet:

        <dict>
            <key>abbreviation</key>
            <string></string>
            <key>abbreviationMode</key>
            <integer>0</integer>
            <key>creationDate</key>
            <date>2016-09-05T08:43:24Z</date>
            <key>extraInfo</key>
            <dict>
                <key>pendingSuggestionDate</key>
                <date>2016-09-05T08:43:24Z</date>
            </dict>
            <key>label</key>
            <string></string>
            <key>modificationDate</key>
            <date>2016-09-05T08:43:24Z</date>
            <key>plainText</key>
            <string></string>
            <key>snippetType</key>
            <integer>0</integer>
            <key>uuidString</key>
            <string>64B55BB3-F188-4B0F-ABC7-43FB3772D740</string>
        </dict>

in Xcode, it shows that it's empty between the <string></string>, but in SublimeText, I'm actually seeing

Looks like the abbreviation is blank as well. Can you try finding and removing this snippet and running again?

mcfoton commented 8 years ago

haha, yeah, it was one of the "suggested" snippets that was causing the problem. Thank you! <3