In this tutorial I will show you how to generate QR Code image with python. The QR code module is used to generate QR Code.
CODE:
import qrcode
qr = qrcode.QRCode(
version= 1 ,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size= 6 ,
border= 3
)
img = qr.add_data("www.infinetsoft.com")
img = qr.make_image()
with open('images/qrcode.png', 'wb') as f:
img. save(f)
You will get this following error "import qrcode could not be resolved". To resolve this you need to install qrcode.
pip install qrcode
Post your comments / questions
Recent Article
- How to check PAN-Aadhaar is Linked or NOT?
- How to customize pagination for django admin?
- How to fix HAXM is not installed |in Android Studio
- How to fix CMOS Checksum Error in Computer or Laptop | SOLVED
- Reactivating windows after a Hardware change on PC or Laptop
- FIXED: Windows reported that the hardware of your device has changed. Error code :0xc004F211
- "redirect" is not defined pylance("reportUndefinedVariable)
- This action cannot be completed because the file is open in SQL Server(SQLEXPRESS) - FIXED
Related Article