gftools
gftools copied to clipboard
Error with diffenator / 'NoneType' object is not iterable
Running on one variable font (Nunito)
INFO:__main__:Running Diffenator
Traceback (most recent call last):
File "/Users/rosalie/Google/env/bin/gftools-qa.py", line 492, in <module>
main()
File "/Users/rosalie/Google/env/bin/gftools-qa.py", line 479, in main
qa.diffenator()
File "/Users/rosalie/Google/env/bin/gftools-qa.py", line 141, in diffenator
for style in self.matching_instances:
TypeError: 'NoneType' object is not iterable
I take it you're trying to run this pr, https://github.com/google/fonts/pull/4309 locally?
yep
Same issue with https://github.com/google/fonts/pull/4291
I reinstalled all the brew packages, and gftools gen-html diff -imgs
works fine
That CI issue happened because the issue was too long to post, not diffenator.
Exception: GitHub POST query failed to url https://api.github.com/repos/google/fonts/issues/4291/comments:
[ { 'code': 'unprocessable',
'field': 'data',
'message': 'Body is too long (maximum is 65536 characters)',
'resource': 'IssueComment'}]
Error: Process completed with exit code 1.
but I am doing it locally not trying to post it
I'm also getting the same problem here. This is before it tries to post anything:
$ PYTHONPATH=~/others-repos/gftools/Lib gftools qa -f *.ttf --diffenator
INFO:__main__:No regression checks possible since there are no previous fonts.
INFO:__main__:Running Diffenator
Traceback (most recent call last):
File "/opt/homebrew/bin/gftools-qa.py", line 500, in <module>
main()
File "/opt/homebrew/bin/gftools-qa.py", line 487, in main
qa.diffenator()
File "/opt/homebrew/bin/gftools-qa.py", line 149, in diffenator
for style in self.matching_instances:
TypeError: 'NoneType' object is not iterable
Actually this is probably because it can't find the previous fonts, d'oh. Adding -fb ~/others-repos/fonts/ofl/notosans/*.ttf
works...
diffenator is supposed to load the fonts from GF
If you add -a
, yes?
AH silly me, you were right, I forgot the -gfb
argument, don't know why I thought it was doing it automatically.
Ok this issue is therefore useless, I close it.
tbh the error message could be better so I'm reopening this.
We use diffenator2 so I think this is now stale. We also get a better error message now when a match cannot be found:
ValueError: Matcher was not able to detect any matching styles for instances method.
Please ensure that variable fonts have fvar instances, both fonts have designspaces which overlap or ensure that both sets of static fonts have some matching styles.