Skip to content

Font cache building of matplotlib blocks requests made to HTTPd #6721

Closed
@selvamvinod

Description

@selvamvinod

Platform details:
CentOS Linux release 7.2.1511 (Core)
Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/7.0.7 mod_wsgi/4.5.3 Python/3.5.2

The below script blocks and gives
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.') with the matplotlib version I got from https://github.com/matplotlib/matplotlib
by a git clone on 9th Jul 2016.(Or may be 10th Jul?....Date same as my previous comment date)

# -*- coding: utf-8 -*-
import imp
import codecs
import os, sys,imp
import cgi
import io
import MySQLdb as mdb
import sys
from collections import OrderedDict
import sys
import unicodedata

import numpy as np
from mpl_toolkits.basemap import Basemap
#import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt

import io


def application(environ, start_response):
    map = Basemap(width=10,
                  height=20,
                  resolution='c',
                  projection='gall',
                  lon_0=0)

    map.drawcoastlines()
        ...
        ...
        ...
       img_io = io.BytesIO()
       return img_io

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions