Skip to content

3.1.0 RC4 throws font permission error after upgrade on Windows

I installed 3.1.0 RC4 (windows, 64-bit installer) as an upgrade on a stable 3.0.2 install.

After installation, I get the following critical error on launch. OpenLP then fails to load:

Traceback (most recent call last):
  File "openlp\__main__.py", line 79, in <module>
  File "openlp\__main__.py", line 75, in start
  File "openlp\core\app.py", line 600, in main
  File "openlp\core\ui\firsttimelanguageform.py", line 42, in __init__
  File "openlp\core\ui\firsttimelanguagedialog.py", line 40, in setup_ui
  File "openlp\core\common\__init__.py", line 190, in __call__
  File "openlp\core\ui\icons.py", line 49, in __init__
  File "qtawesome\__init__.py", line 280, in load_font
  File "qtawesome\__init__.py", line 130, in _instance
  File "qtawesome\iconic_font.py", line 338, in __init__
  File "qtawesome\iconic_font.py", line 374, in load_font
  File "qtawesome\iconic_font.py", line 593, in _get_fonts_directory
  File "qtawesome\iconic_font.py", line 623, in _install_fonts
  File "shutil.py", line 419, in copy
  File "shutil.py", line 258, in copyfile
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\[my-username]\\AppData\\Local\\Microsoft\\Windows\\Fonts\\codicon.ttf'

The relevant line (openlp\core\ui\icons.py, line 49) is

qta.load_font('op', font_path, charmap_path)

The codicon.ttf file exists in the requested directory, and my user seems to have Full Control access to it.

Other things tried:

  • Running OpenLP as Administrator does not help.
  • Manually installing the font (for my user, then for all users) does not help.
  • Repairing the installation using the installer does not help.

The only fix is to manually delete the codicon.ttf file from the specified directory. The error is then repeated for materialdesignicons6-webfont.ttf. When this is deleted, OpenLP loads.

The program then goes on to run the First-Time Wizard, even though there's an existing install - could the issue be that it's failing to detect an existing installation, and trying to reinstall files that already exist?