diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 2c1f73547ba2..04c5da0f0996 100755 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -707,7 +707,7 @@ def __call__(self, x, pos=None): elif six.callable(fmt): result = fmt(x, pos) else: - raise TypeError('Unexpected type passed to {!r}.'.formatter(self)) + raise TypeError('Unexpected type passed to {0!r}.'.format(self)) return result