diff --git a/lib/matplotlib/dviread.py b/lib/matplotlib/dviread.py index b12abf4148cd..b38af56e67ec 100644 --- a/lib/matplotlib/dviread.py +++ b/lib/matplotlib/dviread.py @@ -640,7 +640,8 @@ def _read(self): Read one page from the file. Return True if successful, False if there were no more pages. """ - packet_len, packet_char, packet_width = None, None, None + packet_char, packet_ends = None, None + packet_len, packet_width = None, None while True: byte = ord(self.file.read(1)[0]) # If we are in a packet, execute the dvi instructions