fix(label): Try another way to serialize
This commit is contained in:
parent
536d27d272
commit
b52ee09b90
3 changed files with 3 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,7 +2,7 @@
|
|||
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,visualstudiocode
|
||||
|
||||
# File generated by test server
|
||||
test.png
|
||||
test.*
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
|
|
|
@ -40,7 +40,7 @@ class PhomemoLabelPlugin(LabelPrintingMixin, SettingsMixin, InvenTreePlugin):
|
|||
# Read settings
|
||||
ip_address = self.get_setting('IP_ADDRESS')
|
||||
port = int(self.get_setting('PORT'))
|
||||
label_data = kwargs['label_instance']
|
||||
label_data = kwargs['label_instance'].object_to_print
|
||||
|
||||
# Send the label to the printer
|
||||
try:
|
||||
|
|
|
@ -11,7 +11,7 @@ s.listen(1)
|
|||
while True:
|
||||
conn, addr = s.accept()
|
||||
print(addr)
|
||||
printer = open('test.json', 'w')
|
||||
printer = open('test.json', 'wb')
|
||||
while True:
|
||||
data = conn.recv(91000)
|
||||
print('data received')
|
||||
|
|
Loading…
Add table
Reference in a new issue