Closed simonkuehling closed 2 years ago
The particulars of the error message should be provided in your notifications:
The notification says 'length'
as the message body - haven't figured out where that comes from...
So far I verified that the label_image
object is supplied correctly by saving it as a PNG and manually printing through brother_ql
:
def print_label(self, label_image, **kwargs):
"""
Send the label to the printer
"""
label_image.save("/home/inventree/debuglabel.png")
[...]
And what configuration do you have for the plugin:
Maybe the error is coming from here:
length = kwargs['length']
Can you print out the **kwargs
which are supplied to the print_label
function?
FYI I am now getting the exact same error message on my end, investigating now.
Here is my settings:
And this is the kwargs
variable from inside print_label()
:
inventree-dev-worker | Plugin 'brother' is printing a label
inventree-dev-worker | {'width': 70.0, 'height': 24.0}
inventree-dev-worker | Label printing failed: Sending notification to user 'admin'
Does BrotherQLRaster
do automatic resizing like if brother_ql print
is run from command line?
Oh, this is probably why - we are reading length
and width
here, but the array has height
and width
as its keys:
# Extract length and width information
length = kwargs['length']
width = kwargs['width']
{'width': 70.0, 'height': 24.0}
Yep, fix incoming :) not sure how I didn't see this in my testing previously!
Please install latest version and check again :)
amazing! It is printing now :-)
I now see a new topic - but I will open another issue for that in a second..
Hi @SchrodingersGat
I am running the development docker server for now - the plugin installed fine there and is available in inventree now. When trying to print a label I get a
Label printing failed
notification and am wondering how to best debug here...?My label printer configuration in the plugin:
I verified
brother_ql
is working from inside the docker container with my printer and the same configuration as in inventree:This is an excerpt from the logs: