Skip to content

cannot import name 'Checker' from 'shaperglot' [googlefonts.glyphsets.shape_languages] #4987

Open
@arrowtype

Description

@arrowtype

Observed behaviour

I’m trying to run the adobe fonts profile.

It mostly seems to work well, but the command line output starts with the following error:

/Users/stephennixon/venv/lib/python3.12/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/stephennixon/venv/lib/python3.12/site-packages/shaperglot/__init__.py)

Expected behaviour

Based on the current adobefonts profile, I wouldn’t expect the googlefonts.glyphsets.shape_languages check to run at all, so I wouldn’t expect the warning.

Still, I wanted to test the check in general, but even that isn’t working for me:

▶ fontbakery check-googlefonts <Family_path>/fonts/otf/*.*tf                                                                           
/Users/stephennixon/venv/lib/python3.12/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/stephennixon/venv/lib/python3.12/site-packages/shaperglot/__init__.py)
  warnings.warn("Failed to load %s: %s" % (import_path, e))
Traceback (most recent call last):
  File "/Users/stephennixon/venv/bin/fontbakery", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/stephennixon/venv/lib/python3.12/site-packages/fontbakery/cli.py", line 434, in main
    profile = profile_factory(get_module(args.profile))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stephennixon/venv/lib/python3.12/site-packages/fontbakery/fonts_profile.py", line 151, in profile_factory
    add_checks_to_nascent_profile(
  File "/Users/stephennixon/venv/lib/python3.12/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

I also tried:

  • Running only this check: fontbakery check-googlefonts -c googlefonts.glyphsets.shape_languages <Familyname>/fonts/otf/*.*tf
  • Running a custom profile with only that check

Both things also failed.

Am I doing something wrong?

Possible related issue/typo?

It does seem like there may be a typo in the legacy check IDs, where the new ID is missing an "s" at the end:

"com.google.fonts/check/glyphsets/shape_languages": "googlefonts/glyphsets/shape_language",

@check(
id="googlefonts/glyphsets/shape_languages",

...but I can’t tell if that is having any impact, here.

It does seem to be correctly referenced in the google fonts profile:

"googlefonts/glyphsets/shape_languages",

Resources and steps needed to reproduce

(Provide the font file that causes the issue, and the exact steps to reproduce it. Also mention the FontBakery version you're using, and some details about your system, e.g. OS, Python version, etc.)
I’ve tried making a clean venv and updating versions of various software, but I’m still running into this.

Versions:

  • fontbakery 0.13.2
  • shaperglot 0.6.4
  • glyphsets 1.1.0
  • Python 3.12.2

Any insights appreciated here. I’ll try to update if I realize what’s missing.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions