From a3e31f26ed2e051378b0c40c365d279e3aa40ea8 Mon Sep 17 00:00:00 2001 From: Yannick Einsweiler <25224265+yan-hic@users.noreply.github.com> Date: Sun, 26 Mar 2023 17:38:14 -0400 Subject: [PATCH] save fontnames in temp, where always writeable --- xls2xlsx/htmlxls2xlsx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xls2xlsx/htmlxls2xlsx.py b/xls2xlsx/htmlxls2xlsx.py index 42b0bb7..ea3fa54 100644 --- a/xls2xlsx/htmlxls2xlsx.py +++ b/xls2xlsx/htmlxls2xlsx.py @@ -21,6 +21,7 @@ import logging import email # For mht files import shutil +import tempfile from functools import lru_cache from dateutil.parser import parse as date_parse from datetime import datetime, date, timedelta @@ -49,7 +50,7 @@ def __init__(self): self.skinny_chars = "1!|iIl.,;:' " self.upper_chars = "ABCDEFGHJKLMNOPQRSTUVXYZmw()[]$&*-+{}<>/?" self.fat_chars = 'MW@#%_' - fontnames_file = os.path.join(os.path.dirname(__file__), 'fontnames.yaml') + fontnames_file = tempfile.gettempdir() + '/fontnames.yaml' self.name_to_path = {} if os.path.isfile(fontnames_file): with open(fontnames_file, 'r') as fn: