fix(label): Remove encode, it should already be encoded

This commit is contained in:
Andreas Mieke 2024-04-17 21:55:45 -04:00
parent 60f3d79e73
commit b29acedffd
Signed by: zenermerps
SSH key fingerprint: SHA256:Ne+hwc5QIgYlqCuLZ0LV3301Wo/p8UoGOrGC+T6S0t8

View file

@ -63,7 +63,7 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin):
print_socket.settimeout(5)
print_socket.connect((ip_address, port))
data = label_image.tobytes("PNG")
print_socket.send(data.encode())
print_socket.send(data)
print_socket.close()
except Exception as error:
raise ConnectionError('Error connecting to printer server: ' + str(error))