estou gerando qrcodes pelo python, so que quero imprimir diretamente na impressora zebra de etiquetas, eu ja consigo imprimir palavras contidas em uma entry, mas quando tento imprimir o qrcode da erro: codigo:
def printQrCode(self):
img = os.path.join(self.defaultLocation, self.qrPhotoTxt.get() + ".jpg")
image1 = Image.open(img)
basewidth = 240
wpercent = (basewidth / float(image1.size[0]))
hsize = int((float(image1.size[1]) * float(wpercent)))
image = image1.resize((basewidth, hsize), PIL.Image.ANTIALIAS)
self.photo = ImageTk.PhotoImage(image=image)
self.imgPanel.create_image(2, 2, anchor=NW, image=self.photo)
self.imgPanel.image = self.photo
label = """
^XA
^FO10,15
^A0,40,20
^FD
"""+image+"""
^FS
^FO10,60
^A0,40,20
^FD
Test Zebra
^FS
^FO10,105
^A0,40,20
^FD
Test Zebra
^FS
^XZ
"""
from zebra import zebra
z = zebra('ZDesigner ZT230-200dpi ZPL')
z.output(label)
erro em questao:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1532, in __call__
return self.func(*args)
File "E:/CharIp ServerFTP_1.1/CharIP_1.1.6/QRcodeTKinter.py", line 103, in printQrCode
"""+image+"""
TypeError: cannot concatenate 'str' and 'instance' objects
Alguem poderia me ajudar?