Closed ediazpacheco closed 9 years ago
Under Python 2.7.6 I get:
Traceback (most recent call last): File "", line 6, in ValueError: I/O operation on closed file.
using the code:
import pyqrcode from io import BytesIO qr = pyqrcode.create("my qr string", mode='binary', version=7) f=BytesIO() qr.png(f, scale=4) f.getvalue()
The code runs fine if I save the file to disk using:
qr.png("myqr.png", scale=4)
I tried hard to debug this but I can't find where the stream is being closed and there is not any .close() statement for the stream. [1]
Ops, I see that is a probem resolved here: https://github.com/mnooner256/pyqrcode/pull/6
Under Python 2.7.6 I get:
Traceback (most recent call last): File "", line 6, in
ValueError: I/O operation on closed file.
using the code:
import pyqrcode from io import BytesIO qr = pyqrcode.create("my qr string", mode='binary', version=7) f=BytesIO() qr.png(f, scale=4) f.getvalue()
The code runs fine if I save the file to disk using:
qr.png("myqr.png", scale=4)
I tried hard to debug this but I can't find where the stream is being closed and there is not any .close() statement for the stream. [1]