gftools icon indicating copy to clipboard operation
gftools copied to clipboard

gftools-what-subsets – ImportError: No module named gftools.util

Open thundernixon opened this issue 5 years ago • 1 comments

I'm attempting to check the coverage of a TTF with the what-subsets tool.

However, it has a print error when installed with pip install -U git+https://github.com/googlefonts/gftools (line 41 is missing parentheses) because it needs to edited to work in a python3 environment.

However when I try to install my local repo of gftools with pip install -e <local_gftools_path> (so I can fix the print issue), I get the following error on usage:

(venv)▶ gftools what-subsets ofl/aladin/Aladin-Regular.ttf # any font; doesn't matter
Traceback (most recent call last):
  File "/Users/stephennixon/type-repos/google-font-repos/gftools/bin/gftools-what-subsets.py", line 24, in <module>
    from gftools.util import google_fonts as fonts
ImportError: No module named gftools.util

Strangely, when I use gftools add-font – which contains the exact same import line as what-subsetsadd-font works just as I expect it to.

I've tried dumb fixes line copy-pasting all the imports from add-font into what-subsets. I've also tried installing gftools into a python2 virtual environment, but this has all sorts of other installation issues (though, I can do this more if anyone really thinks it's my best option).

What else might I try to solve this import error?

thundernixon avatar Mar 20 '19 18:03 thundernixon

I'd like to take a look at this soon

felipesanches avatar Dec 17 '21 09:12 felipesanches

This appears to have been fixed.

simoncozens avatar Nov 27 '22 21:11 simoncozens