lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.25k stars 660 forks source link

Changes in 7.4.2 broke code that worked in 7.3.1 #320

Open tzachi-dar opened 1 year ago

tzachi-dar commented 1 year ago

Hi,

I have a simple utilty that is used to create QR code and display it in a browser. Everything worked correctly in 7.3.1 but things have stopped workign in chrome 7.4.2

Here is my python code:


def generateQR(key, url):
    print("xxxx",key, url)
    qr_data = {}
    message = ["https://" + key + "@" + url+ "/api/v1"]
    qr_data["rest"] = {"endpoint" : message}
    factory = qrcode.image.svg.SvgImage
    img = qrcode.make(dumps(qr_data), image_factory=factory, box_size=20)
    with open('myfile.png', 'wb') as f:
        img.save(f)
    print("xxxxx",img, vars(img))
    stream = BytesIO()
    img.save(stream)
    return stream.getvalue().decode()
'''
Is this a knowen issue?

Should I change anything in my code?
I can also add here the generated image file or my html code.

Thanks
Tzachi