SOLVED Problem saving after update to 4.2



  • I recently updated from 4.0 to 4.2, but upon saving, am now getting this error message 'The document could not be saved. The file isn’t in the correct format.'

    Output has

    File "lib/fontObjects/doodleFont.pyc", line 283, in autoSave
      File "lib/fontObjects/doodleFont.pyc", line 202, in save
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/font.py", line 896, in save
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/font.py", line 933, in _saveInfo
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/defcon/objects/font.py", line 944, in saveInfo
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/fontTools/ufoLib/__init__.py", line 1289, in writeInfo
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/fontTools/ufoLib/__init__.py", line 189, in _writePlist
    fontTools.ufoLib.errors.UFOLibError: 'fontinfo.plist' could not be written on <osfs '/Users/elliehenderson/Library/Autosave Information/Steppenwolf-Regular_97 (autosaved RoboFont-4).ufo'> because the data is not properly formatted: unsupported type: <class 'NoneType'>
    Could not auto save
    'fontinfo.plist' could not be written on <osfs '/Users/elliehenderson/Library/Autosave Information/Steppenwolf-Regular_97 (autosaved RoboFont-4).ufo'> because the data is not properly formatted: unsupported type: <class 'NoneType'>
    

    Any ideas?


  • admin

    The switching to a newer version is the causing this issue.

    A plist cannot write None to the file.

    you can search by validating your info object:

    from fontTools.ufoLib import fontInfoAttributesVersion3, validateInfoVersion3Data
    
    # get the current font
    font = CurrentFont()
    # get the info dict as a defcon object
    info = font.info.asDefcon()
    
    data = dict()
    # loop over all possible info attributes
    for attr in fontInfoAttributesVersion3:
        value = getattr(info, attr)
        if value is None:
            continue
        # stroke the attribute if the data is not None
        data[attr] = value
    
    # print out the result
    print(data)
    # validate the info dict
    validateInfoVersion3Data(data)
    

    good luck!


  • admin

    conversation moved to the RoboFont Slack Community --> https://robofontcommunity.slack.com/archives/C03A6AYH6TE/p1655135673859439



  • @frederik Thank you - seems like the issue is now resolved!


Log in to reply