failed experiment with tight_layout

/usr/lib64/python2.7/site-packages/matplotlib/ UserWarning:
tight_layout : falling back to Agg renderer
  warnings.warn("tight_layout : falling back to Agg renderer")
Traceback (most recent call last):
  File "./", line 10, in <module>
  File "/usr/lib64/python2.7/site-packages/matplotlib/", line 1255, in
    fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
  File "/usr/lib64/python2.7/site-packages/matplotlib/", line 1605, in
  File "/usr/lib64/python2.7/site-packages/matplotlib/", line
325, in get_tight_layout_figure
    max_nrows = max(nrows_list)
ValueError: max() arg is an empty sequence

The plotting script is quite long and complex, so I won't post it, but it

import matplotlib as mpl
mpl.use ('pdf')

import matplotlib.pyplot as plt

It produces multipage-pdf using
from matplotlib.backends.backend_pdf import PdfPages

It works without plt.tight_layout(). Any clues what I did wrong here?