I wanted to use the created qrcode PIL Image to use it in a different package class. Since this class checks for instance of type Image, the created Image of type qrcode.image.pil.PilImage does not match the PIL type Image and the application crashes.
My Workaround
At the moment I use the underscore_attribute image._img, which satisfies the isinstance check against Image. But I want to understand why you create your own version, which is not compatible with a normal Image type?
Version Information
pythob: 3.9 system: windows 10 qrcode: 7.3.1
My Issue
I wanted to use the created qrcode PIL Image to use it in a different package class. Since this class checks for instance of type Image, the created Image of type
qrcode.image.pil.PilImage
does not match thePIL
typeImage
and the application crashes.My Workaround
At the moment I use the underscore_attribute
image._img
, which satisfies theisinstance
check againstImage
. But I want to understand why you create your own version, which is not compatible with a normal Image type?