mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
410 stars 76 forks source link

No longer working on python 2.7.9 #26

Closed fieldfoxWim closed 9 years ago

fieldfoxWim commented 9 years ago

The version after the commit eb4dd81a004a4982137892b3c282edcf5c72652f (fixing stream closing issues) produces empty qr codes on python version 2.7.9

Code example to test with:

import pyqrcode
import base64
import io

qrdata = pyqrcode.create("Wim")
raw = io.BytesIO()
qrdata.png("wim.png", scale=8)
qrdata.png(raw, scale=8)

print "|" + base64.b64encode(raw.getvalue()) + "|"
mnooner256 commented 9 years ago

Thanks for noticing. The problem was somehow the line that actually writes the code to the stream got chopped off. No idea how that happened. Should be fixed now.

I am in the middle of processing over 100 commits made by a contributor. I generally use my github repo as the bleeding edge, where code is not necessarily tested very thoroughly. After I get done with the updates I release a new version on PyPi.