Skip to content

Running Kiva for the first time raises errors while recreating font cache #882

@achabotl

Description

@achabotl

I just updated to enable 5.2.1 and ran a small app that uses Chaco and got the traceback below (macOS). Running it a 2nd time didn't produce any traceback. An apprentice ran into the same issue on Windows yesterday, see 2nd traceback.

It's not broken per se, the app opens normally, but it's disconcerting.

Could not convert font to FontEntry for file /Users/USER/Library/Fonts/Humor-Sans-1.0.ttf
Traceback (most recent call last):
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py", line 427, in _load_from_cache_or_rebuild
    fontManager = _pickle_load(cache_file)
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py", line 477, in _pickle_load
    data = pickle.load(fh)
AttributeError: Can't get attribute 'FontEntry' on <module 'kiva.fonttools.font_manager' from '/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'
Could not convert font to FontEntry for file /System/Library/AssetsV2/com_apple_MobileAsset_Font6/77368dfa9dba1fbbd6019b7ee1a7fc25d1169649.asset/AssetData/BiauKai.ttf
Traceback (most recent call last):
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py", line 427, in _load_from_cache_or_rebuild
    fontManager = _pickle_load(cache_file)
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py", line 477, in _pickle_load
    data = pickle.load(fh)
AttributeError: Can't get attribute 'FontEntry' on <module 'kiva.fonttools.font_manager' from '/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/font_manager.py'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "/Users/USER/.edm/envs/python-class/lib/python3.6/site-packages/kiva/fonttools/_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'

2nd traceback

Could not convert font to FontEntry for file C:\Windows\Fonts\MTEXTRA.TTF
Traceback (most recent call last):
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'
Could not convert font to FontEntry for file C:\Windows\Fonts\sapdn.ttf
Traceback (most recent call last):
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'
Could not convert font to FontEntry for file C:\Windows\Fonts\sapin.ttf
Traceback (most recent call last):
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'
Could not convert font to FontEntry for file c:\program files (x86)\common files\microsoft shared\equation\mtextra.ttf
Traceback (most recent call last):
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 112, in _build_ttf_entries
    entries.append(_ttf_font_property(fpath, font))
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_scan_parse.py", line 196, in _ttf_font_property
    props = get_ttf_prop_dict(font)
  File "C:\Users\USER\.edm\envs\python-class\lib\site-packages\kiva\fonttools\_util.py", line 158, in get_ttf_prop_dict
    cp_bits = table.ulCodePageRange1
AttributeError: 'table_O_S_2f_2' object has no attribute 'ulCodePageRange1'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions