Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5085af7 commit 9c2cf4cCopy full SHA for 9c2cf4c
1 file changed
lib/matplotlib/backends/backend_pdf.py
@@ -1295,12 +1295,12 @@ def _writePng(self, data):
1295
while True:
1296
n = buffer.readinto(header)
1297
assert n == 8
1298
- length, type = struct.unpack(b'!L4s', header)
+ length, type = struct.unpack(b'!L4s', bytes(header))
1299
if type == b'IDAT':
1300
data = bytearray(length)
1301
n = buffer.readinto(data)
1302
assert n == length
1303
- self.currentstream.write(data)
+ self.currentstream.write(bytes(data))
1304
written += n
1305
elif type == b'IEND':
1306
break
0 commit comments