UNSOLVED UnicodeDecodeError when building Scripts menu



  • I just updated RF from 3.3b => 3.3 — I get the following traceback when starting up RoboFont:

      File "lib/doodleDelegate.pyc", line 95, in sendEvent_
      File "/Applications/RoboFont.app/Contents/Resources/lib/python3.7/vanilla/dialogs.py", line 72, in completionHandler_
        self._resultCallback(self._result)
      File "lib/UI/pathPopUpButton.pyc", line 45, in _choosePath
      File "lib/UI/preferences/preferencesPythonEditor.pyc", line 71, in pathChooserCallback
      File "lib/scripting/setScriptMainMenu.pyc", line 45, in setScriptMainMenu
      File "lib/UI/fileBrowser.pyc", line 777, in getMenu
      File "lib/UI/fileBrowser.pyc", line 779, in getMenu
      File "lib/UI/fileBrowser.pyc", line 779, in getMenu
      File "lib/UI/fileBrowser.pyc", line 775, in getMenu
      File "lib/UI/fileBrowser.pyc", line 758, in __iter__
      File "lib/UI/fileBrowser.pyc", line 745, in getChild_
      File "lib/UI/fileBrowser.pyc", line 639, in __init__
      File "lib/UI/fileBrowser.pyc", line 652, in buildNaming
      File "codecs.pyc", line 322, in decode
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc5 in position 3339: invalid continuation byte
    

    I changed the several files names that had non-ascii characters but it still breaks. Any idea of what to do besides unlink the scripts folder?

    Thanks,
    C



  • I pretty much used this script while going through my whole script folder. The folder pretty big and very unorganized at the moment, but I'll send you an email with that. Thanks for all the help, Frederik!


  • admin

    mm, very strange

    I still dont get it :(

    what kind of script did you run? (to reveal those two files)

    can you share the content of your scripting folder? (also possible off-forum)

    RoboFont supports this:

    • The file name of the script can contain non ascii characters
    • The script can contain non ascii characters
    • The menu short cuts can also contain non ascii characters


  • Sorry, I should have been more specific! When I ran a script to check for utf-8 encoded files the only two that threw an error were these: the Autohint.py and GlyphProofer from House's GitHub.


  • admin

    I cannot reproduce it with Autohint.py.

    Could you share 'the another random file'?



  • Very weird, the files causing the problem was the Autohint.py file from the Adobe Type Github and the another random file file. Thanks though!

    C



  • Sorry for the late reply! @gferreira, yes it was working perfectly fine with 3.3b. I am going to just try and go through all the files and test that they're utf-8 properly encoded. I thought I knew which one was causing the issue but...I was wrong. I'll be back with more info soon:)



  • hello @connor,

    • was it working before the update to 3.3?
    • are you sure the file is saved with utf-8 encoding?

    thanks for any additional info


  • admin

    I cannot reproduce it with a file containing non-ascii or emoji.

    Could you share such a file (or only the header, the first five lines)

    thanks


Log in to reply