question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression (probably) parsing METADATA.pb

See original GitHub issue

(with fontbakery 0.6.1)

Alfa Slab One (METADATA.pb from 2016!!!)

E.g. http://35.225.170.228/report/2763e5df-29e1-4b80-9d68-bfc53400a4e9

(source is the same as in https://github.com/google/fonts/tree/fb839dd24542f8f1b0678af6f74335553ee8e61a/ofl/alfaslabone)

Example:

>> com.google.fonts/check/081
   METADATA.pb: Fontfamily is listed on Google Fonts API?
 * ERROR: The condition <FontBakeryCondition:family_metadata> had an error: ParseError: 3:1 : Couldn't parse string: 'utf-8' codec can't decode byte 0xe9 in position 6: unexpected end of data
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/checkrunner.py", line 377, in _evaluate_condition
             return None, condition(**args)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/callable.py", line 71, in __call__
             return self._func(*args, **kwds)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/specifications/googlefonts.py", line 408, in family_metadata
             return get_FamilyProto_Message(pb_file)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/utils.py", line 140, in get_FamilyProto_Message
             text_format.Merge(text_data, message)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 536, in Merge
             descriptor_pool=descriptor_pool)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 590, in MergeLines
             return parser.MergeLines(lines, message)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 623, in MergeLines
             self._ParseOrMerge(lines, message)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 638, in _ParseOrMerge
             self._MergeField(tokenizer, message)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 763, in _MergeField
             merger(tokenizer, message, field)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 888, in _MergeScalarField
             value = tokenizer.ConsumeString()
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/venv/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1255, in ConsumeString
             raise self._StringParseError(e)
         

   Result: ERROR

also:

>> com.google.fonts/check/118 with (('font[0]', '../fonts/ofl/alfaslabone/AlfaSlabOne-Regular.ttf'),)
   Glyphs are similiar to Google Fonts version?
 * ERROR: The condition <FontBakeryCondition:api_gfonts_ttFont> had an error: FailedConditionError: The condition <FontBakeryCondition:remote_styles> had an error: FailedConditionError: The condition <FontBakeryCondition:family_metadata> had an error: ParseError: 3:1 : Couldn't parse string: 'utf-8' codec can't decode byte 0xe9 in position 6: unexpected end of data
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/checkrunner.py", line 370, in _evaluate_condition
             args = self._get_args(condition, iterargs, path)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/checkrunner.py", line 509, in _get_args
             args[name] = self._get(name, iterargs, path)
           File "/home/commander/Projekte/fontdev/googlefonts/fontbakery/Lib/fontbakery/checkrunner.py", line 483, in _get
             raise error
         

   Result: ERROR

But, there’s also a failed attempt parsing METADATA.pb due to unknown fields defined in the file. Thus we should have the chck and condition does_METADATA_parse:

(I don’t know where these tested files came from)

http://35.225.170.228/report/d8819464-9208-46cd-9151-903dfd0f4b93

ERROR com.google.fonts/check/092 Checks METADATA.pb font.name field matches family name declared on the name table.

    ERROR
    The condition <FontBakeryCondition:font_metadata> had an error: FailedConditionError: The condition <FontBakeryCondition:family_metadata> had an error: ParseError: 4:1 : Message type "google.fonts.FamilyProto" has no field named "visibility".
    traceback

      File "/usr/local/lib/python3.6/dist-packages/fontbakery/checkrunner.py", line 370, in _evaluate_condition
        args = self._get_args(condition, iterargs, path)
      File "/usr/local/lib/python3.6/dist-packages/fontbakery/checkrunner.py", line 509, in _get_args
        args[name] = self._get(name, iterargs, path)
      File "/usr/local/lib/python3.6/dist-packages/fontbakery/checkrunner.py", line 483, in _get
        raise error

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
felipesanchescommented, Mar 12, 2019

I have just re-run fontbakery on Signika and the parsing errors are gone. Cheers!

0reactions
thundernixoncommented, Mar 18, 2019

Nice; thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Probability Calculation Using Logistic Regression
Logistic Regression is the statistical fitting of an s-curve logistic or logit function to a dataset in order to calculate the probability of...
Read more >
| notebook.community
Define dataset metadata; Define data input function to read the data from csv files ... Use TF Dataset APIs to read and process...
Read more >
GLM_linear.ipynb.txt - Learn PyMC & Bayesian modeling
n", "In general, frequentists think about linear regression as ... posterior distribution about how likely different values of $\\beta$ are.
Read more >
How to deploy TensorFlow models to production using TF ...
The Loader has a pointer to the model on disk along with all the necessary meta-data for loading it. But there is a...
Read more >
A Refresher on Regression Analysis - Harvard Business Review
But do you know how to parse through all the data available to you? The good news is that you probably don't need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found