Closed dscorbett closed 2 months ago
I also observed this error, running with --auto-jobs
has the problems, without --auto-jobs
runs fine.
Another part of the problem is that git_rootdir
temporarily changes the working directory, so checks that depend on the fonts’ paths can fail if the fonts are specified with relative paths. Instead of changing the working directory, it should use git -C
.
thanks, @belluzj!
Observed behavior
Running Font Bakery 0.12.0 with multithreading often causes errors. The errors do not always happen. Attested errors include:
com.google.fonts/check/layout_valid_feature_tags: Failed with AttributeError: FeatureList
``` ERROR Failed with AttributeError: FeatureList File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checkrunner.py", line 213, in _run_check subresults = list(subresults) ^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/layout.py", line 43, in com_google_fonts_check_layout_valid_feature_tags for tag in feature_tags(ttFont): ^^^^^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/layout.py", line 11, in feature_tags if ttFont.get(table) and ttFont[table].table.FeatureList: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontTools/ttLib/tables/otBase.py", line 893, in __getattr__ raise AttributeError(attr) ``` [code: failed-check] ```com.google.fonts/check/layout_valid_script_tags: Failed with AttributeError: ScriptList
``` ERROR Failed with AttributeError: ScriptList File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checkrunner.py", line 213, in _run_check subresults = list(subresults) ^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/layout.py", line 77, in com_google_fonts_check_layout_valid_script_tags for tag in script_tags(ttFont): ^^^^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/layout.py", line 58, in script_tags if ttFont.get(table) and ttFont[table].table.ScriptList: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontTools/ttLib/tables/otBase.py", line 893, in __getattr__ raise AttributeError(attr) ``` [code: failed-check] ```com.google.fonts/check/outline_alignment_miss: list index out of range
``` ERROR list index out of range [code: error] ```com.google.fonts/check/xavgcharwidth: Failed with AttributeError: 'table__h_m_t_x' object has no attribute 'metrics'
``` ERROR Failed with AttributeError: 'table__h_m_t_x' object has no attribute 'metrics' File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checkrunner.py", line 213, in _run_check subresults = list(subresults) ^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/os2.py", line 77, in com_google_fonts_check_xavgcharwidth if not ttFont["hmtx"].metrics: # May contain just '.notdef', which is valid. ^^^^^^^^^^^^^^^^^^^^^^ ``` [code: failed-check] ```com.google.fonts/check/xavgcharwidth: Failed with ZeroDivisionError: division by zero
``` ERROR Failed with ZeroDivisionError: division by zero File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checkrunner.py", line 213, in _run_check subresults = list(subresults) ^^^^^^^^^^^^^^^^ File "/Users/dcorbett/fb-errors/venv/lib/python3.12/site-packages/fontbakery/checks/opentype/os2.py", line 95, in com_google_fonts_check_xavgcharwidth expected_value = int(round(width_sum / count)) ~~~~~~~~~~^~~~~~~ ``` [code: failed-check] ```Expected behavior
Multithreading should not cause errors.
Resources and steps needed to reproduce