From d24be50e70ba6cc4680a2debb76850f462b6f804 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 16 Sep 2022 11:18:17 -0400 Subject: [PATCH] FIX: do not append None to stream in ps This was reported as an issue and this seems like the problem, but we do not have a good test yet. --- lib/matplotlib/backends/backend_ps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py index f209e811f18b..9e9795e134fe 100644 --- a/lib/matplotlib/backends/backend_ps.py +++ b/lib/matplotlib/backends/backend_ps.py @@ -665,8 +665,9 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): curr_stream[1].append( (item.x, item.ft_object.get_glyph_name(item.glyph_idx)) ) - # append the last entry - stream.append(curr_stream) + if curr_stream is not None: + # append the last entry + stream.append(curr_stream) self.set_color(*gc.get_rgb())