Skip to content

Raise more useful error when tfm file is missing #4521

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

Merged
merged 2 commits into from
Jun 14, 2015

Conversation

jkseppan
Copy link
Member

Fixes #4475

@@ -396,6 +396,8 @@ def _xxx(self, special):

def _fnt_def(self, k, c, s, d, a, l, n):
tfm = _tfmfile(n[-l:].decode('ascii'))
if tfm is None:
raise FileNotFoundError("missing font metrics file: %s" % tfm)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this print out None for the file name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 14 Jun 2015, at 21:02, Thomas A Caswell notifications@github.com wrote:

In lib/matplotlib/dviread.py #4521 (comment):

@@ -396,6 +396,8 @@ def _xxx(self, special):

 def _fnt_def(self, k, c, s, d, a, l, n):
     tfm = _tfmfile(n[-l:].decode('ascii'))
  •    if tfm is None:
    
  •        raise FileNotFoundError("missing font metrics file: %s" % tfm)
    
    Won't this print out None for the file name?


Reply to this email directly or view it on GitHub https://github.com/matplotlib/matplotlib/pull/4521/files#r32382377.

You’re right; fixed.

@tacaswell tacaswell added this to the next point release milestone Jun 14, 2015
tacaswell added a commit that referenced this pull request Jun 14, 2015
ENH: Raise more useful error when tfm file is missing
@tacaswell tacaswell merged commit a165735 into matplotlib:master Jun 14, 2015
@jkseppan jkseppan deleted the issue-4475 branch July 6, 2015 11:43
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

Successfully merging this pull request may close these issues.

2 participants