You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the error which happens after image = qr.make_image(...):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.10/site-packages/qrcode/main.py", line 353, in make_image
self.make()
File "/opt/homebrew/lib/python3.10/site-packages/qrcode/main.py", line 160, in make
self.best_fit(start=self.version)
File "/opt/homebrew/lib/python3.10/site-packages/qrcode/main.py", line 232, in best_fit
self.version = bisect_left(
File "/opt/homebrew/lib/python3.10/site-packages/qrcode/main.py", line 115, in version
util.check_version(value)
File "/opt/homebrew/lib/python3.10/site-packages/qrcode/util.py", line 185, in check_version
raise ValueError(f"Invalid version (was {version}, expected 1 to 40)")
ValueError: Invalid version (was 41, expected 1 to 40)
I even tried to make a vcard in Mac OS Contacts App with an image embded and paste the string value within the card file and I got the same error. When I strip out the photo part of the vcard, the qrcode generates without error.
The text was updated successfully, but these errors were encountered:
macmichael01
changed the title
Unable to embed and image into a vcard
Unable to embed an image into a vcard
May 21, 2023
I commented out the line: error_correction=qrcode.constants.ERROR_CORRECT_H, and the qrcode generated. I am also able to use ERROR_CORRECT_L I'm guessing that error correction adds some parity bits that exceed the max allowed characters in a QRCode.
It would be nice there was a better error message indicating what happened.
I am getting an error when trying to embed an image into a vcard whether that be by link or base64 encode. Here is the source code:
Here is the error which happens after
image = qr.make_image(...)
:I even tried to make a vcard in Mac OS Contacts App with an image embded and paste the string value within the card file and I got the same error. When I strip out the photo part of the vcard, the qrcode generates without error.
The text was updated successfully, but these errors were encountered: