Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Exception: Family I B M Plex Sans does not exist on Google Fonts!" #45

Open
thundernixon opened this issue Jan 31, 2019 · 2 comments
Open

Comments

@thundernixon
Copy link

thundernixon commented Jan 31, 2019

When I try to diff IBM Plex Sans Bold, I get the following error:

500 error
Submit following traceback to the GF Regression repo

Traceback (most recent call last): 
File "/usr/local/lib/python3.7/site-packages/flask/app.py", 
    line 2292, in wsgi_app response = self.full_dispatch_request() 
File "/usr/local/lib/python3.7/site-packages/flask/app.py", 
    line 1815, in full_dispatch_request rv = self.handle_user_exception(e) 
File "/usr/local/lib/python3.7/site-packages/flask/app.py", 
    line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) 
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", 
    line 35, in reraise raise value 
File "/usr/local/lib/python3.7/site-packages/flask/app.py", 
    line 1813, in full_dispatch_request rv = self.dispatch_request() 
File "/usr/local/lib/python3.7/site-packages/flask/app.py", 
    line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) 
File "./main.py", 
    line 67, in upload_fonts family_before = family.from_googlefonts(family_after.name) 
File "./family.py", 
    line 239, in from_googlefonts fonts = downloadfonts.googlefonts(family_name) 
File "./downloadfonts.py", 
    line 24, in googlefonts raise Exception('Family {} does not exist on Google Fonts!'.format(family)) Exception: Family I B M Plex Sans does not exist on Google Fonts!

Is the I B M supposed to have spaces in it here, or could this be a relatively simple name-parsing / string-manipulation issue?

@thundernixon
Copy link
Author

(error reformatted in top comment for more readability)

@m4rc1e
Copy link
Collaborator

m4rc1e commented Jan 31, 2019

or could this be a relatively simple name-parsing / string-manipulation issue?

Yep, we have a similar issue with add-font. The family name is derived from the filename, using a camelcase splitting function. When it encounters IBM it will produce I B M. In order not to split, we add it to https://github.com/googlefonts/gfregression/blob/master/app/utils.py#L19-L60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants