Bug 1653300

Summary: 'Unable to parse the pattern' spurious message when using 'title'
Product: Red Hat Enterprise Linux 7 Reporter: Bert DeKnuydt <Bert.Deknuydt>
Component: python-matplotlibAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.6CC: bhu, jhouska, jkacur, qzhao, rik.theys, tagoh
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1724884 (view as bug list) Environment:
Last Closed: 2019-08-06 13:04:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1655694, 1724884    
Attachments:
Description Flags
Make font manager ignore Key Errors for bad-fonts patch
none
Skip over broken TTF fonts when creating cache
none
Fix for Python3
none
Fix catch ValueError
none
Remove call to nonexistent FT"Font get fontsize none

Description Bert DeKnuydt 2018-11-26 13:42:01 UTC
Description of problem:

On RHEL 7.6, both on x86_64 as on ppc64le, using 'title' commands
in Matplotlib issues a warning/error 

           'Unable to parse the pattern'

On RHEL 7.5, and for that matter, any recent Fedora
it does NOT give this spurious message.

Version-Release number of selected component (if applicable):

python-matplotlib-1.2.0-15.el7.x86_64

This package has not been updated 7.5 -> 7.6,
So it must be in dependencies...

How reproducible:

Always.

Steps to Reproduce:
1. Run e.g this:
   #! /bin/python
   import matplotlib.pyplot as plt
   plt.title('Beren!')
   plt.show()

Actual results:

The plot succeeds, but a line
'Unable to parse the pattern' is printed to stderr.

Expected results:

No spurious message.

Additional info:

Smells like something font-related.

Comment 2 Bert DeKnuydt 2018-11-28 11:26:15 UTC
The guilty part seems to be 'freetype'.  Downgrading it (and its dependencies)
to the 7.5 versions, solves the problem.

See https://bugzilla.redhat.com/show_bug.cgi?id=1653706

Comment 3 Akira TAGOH 2018-11-29 10:31:33 UTC
That message should be came from either commands of fontconfig such as fc-match/fc-list/fc-pattern though, strictly speaking this isn't a regression at all. because this was added for valid error check. thus, this is a potential bug in something calls those commands. see https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/604c2a683f1357fc65bad372b5d25a90099f827f

Comment 4 Akira TAGOH 2018-11-29 11:07:50 UTC
Querying the size in the name such as "large" is wrong. fontconfig doesn't support that. that should be converted to the number.

Comment 6 John Kacur 2019-01-23 12:31:34 UTC
Created attachment 1522635 [details]
Make font manager ignore Key Errors for bad-fonts patch

Comment 7 John Kacur 2019-01-23 12:32:32 UTC
Created attachment 1522636 [details]
Skip over broken TTF fonts when creating cache

Comment 8 John Kacur 2019-01-23 12:33:31 UTC
Created attachment 1522637 [details]
Fix for Python3

Comment 9 John Kacur 2019-01-23 12:34:21 UTC
Created attachment 1522639 [details]
Fix catch ValueError

Comment 10 John Kacur 2019-01-23 12:35:01 UTC
Created attachment 1522640 [details]
Remove call to nonexistent FT"Font get fontsize

Comment 17 Jan Houska 2019-06-24 10:36:41 UTC
ASSIGNED:

"Unable to parse the pattern" is still present during t.py execution. (For reproducer see comment 16)

Comment 24 errata-xmlrpc 2019-08-06 13:04:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2203