I'm trying to add a multiline text in reportlab canvas by using reportlab.platypus.Paragraph like this:
desc = Paragraph("""Hi everyone""")
desc.wrapOn(c, width, height)
desc.drawOn(c, x, y)
When I run the script an AttributeError pops up, saying that Paragraph has no attribute decode.
I'm not sure where's that error coming from (or how to solve it).
*I'm using Python 3.10. Not sure if that's relevant to the question.
Oh wait, sorry. I forgot I had a regular
drawStringafterwards, pulling from the same "desc" object (which used to be a regular string), and apparently that drawString is the thing that broke (not the code drawing the paragraph itself).Just... make sure you're not trying to draw a Paragraph with drawString.