Skip to content

AttributeError: 'NoneType' object has no attribute 'getdraw' #6743

Answered by radarhere
jegan221724 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi. paste() doesn't return a new image, it just alters the image that it is being called on. So you are setting Qr_final to None in the following code.

Qr_final = QRimg.paste(logo, pos)
draw = ImageDraw.Draw(Qr_final)

Instead, just use QRimg.

QRimg.paste(logo, pos)
draw = ImageDraw.Draw(QRimg)
# ...

# save the QR code generated
QRimg.save(ser + str(i) + png)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@radarhere
Comment options

@radarhere
Comment options

@jegan221724
Comment options

@radarhere
Comment options

@jegan221724
Comment options

Answer selected by jegan221724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants