fontbakery
fontbakery copied to clipboard
Web crash on NanumMyeongjo-Regular.ttf
Observed behaviour
I put github.com/google/fonts /ofl/nanummyeongjo/NanumMyeongjo-Regular.ttf into fontbakery.com and got this crash:
Traceback (most recent call last):
File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
await CodeRunner(
File "/lib/python311.zip/_pyodide/_base.py", line 363, in run_async
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 5, in
File "/home/pyodide/fbwebapi.py", line 122, in run_fontbakery
runner.run(reporters)
File "/lib/python3.11/site-packages/fontbakery/checkrunner.py", line 327, in run
distribute_result(result)
File "/lib/python3.11/site-packages/fontbakery/checkrunner.py", line 313, in distribute_result
reporter.receive_result(result)
File "/home/pyodide/fbwebapi.py", line 92, in receive_result
data = json.loads(json.dumps(data))
^^^^^^^^^^^^^^^^
File "/lib/python311.zip/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python311.zip/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python311.zip/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/lib/python311.zip/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type MemoryError is not JSON serializable
Expected behaviour
No crash ;)
I now got this error when running a 3 style static family:
Traceback (most recent call last):
File "/lib/python311.zip/_pyodide/_base.py", line 540, in eval_code_async
await CodeRunner(
File "/lib/python311.zip/_pyodide/_base.py", line 363, in run_async
coroutine = eval(self.code, globals, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 5, in
File "/home/pyodide/fbwebapi.py", line 107, in run_fontbakery
profile = profile_factory(import_module("fontbakery.profiles." + profilename))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.11/site-packages/fontbakery/fonts_profile.py", line 140, in profile_factory
included_profile = profile_factory(module)
^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.11/site-packages/fontbakery/fonts_profile.py", line 151, in profile_factory
add_checks_to_nascent_profile(
File "/lib/python3.11/site-packages/fontbakery/fonts_profile.py", line 116, in add_checks_to_nascent_profile
raise ValueError(f"Check '{check}' not found")
ValueError: Check 'interpolation_issues' not found
Same with latest release locally:
$ pip3 install -U fontbakery
...
Successfully installed fontbakery-0.13.2
$ fontbakery check-googlefonts Family-Regular.ttf
/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/fontbakery/fonts_profile.py:103: UserWarning: Failed to load fontbakery.checks.vendorspecific.googlefonts.glyphsets.shape_languages: cannot import name 'Checker' from 'shaperglot' (/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/shaperglot/__init__.py)
warnings.warn("Failed to load %s: %s" % (import_path, e))
/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Traceback (most recent call last):
File "/Users/dcrossland/Library/Python/3.9/bin/fontbakery", line 8, in <module>
sys.exit(main())
File "/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/fontbakery/cli.py", line 434, in main
profile = profile_factory(get_module(args.profile))
File "/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/fontbakery/fonts_profile.py", line 151, in profile_factory
add_checks_to_nascent_profile(
File "/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/fontbakery/fonts_profile.py", line 116, in add_checks_to_nascent_profile
raise ValueError(f"Check '{check}' not found")
ValueError: Check 'googlefonts/glyphsets/shape_languages' not found
$ fontbakery --version
0.13.2
Ah, pip install shaperglot fixed it locally.