[Errno 110] and [Errno 16] on Ubuntu
ossmart opened this issue · 4 comments
I have installed dymoprint on Ubuntu 22.04 following the instructions on this projects page, and am using a DYMO LabelManager Plug N Play, but since right after installing, I get two errors. This first error message usb.core.USBTimeoutError: [Errno 110] Operation timed out
appears when I try to print and the second error message usb.core.USBError: [Errno 16] Resource busy
appears in subsequent tries.
I got the printer to work twice, but I am not sure what actually made it work, likely only a coincidence. The first time I had tried a few times and it failed, so I had left my computer running for a few days, and when I tried again, I was able to print, and turned my computer off. The second time, after many failed attempts, I turned off the power of the printer using the Ubuntu Disk app, the unplugged the printer and plugged the printer back in and I was able to print a couple of labels. I have tried that same trick later but it has not worked for me.
Ubuntu had detected and installed this device as a printer, so I removed it from the printer list, but it still doesn't work with dymoprint.
Here are the full error logs:
[Errno 110]:
`Traceback (most recent call last):
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/gui.py", line 163, in print_label
self.print_server.print_label(self.label_bitmap, self.margin.value())
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/dymo_print_engines.py", line 491, in print_label
lm.printLabel(label_matrix, margin=margin)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 203, in printLabel
self.rawPrintLabel(lines, margin=margin)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 225, in rawPrintLabel
response = self.sendCommand()
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 72, in sendCommand
rspBin = self.devin.read(8)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 1029, in read
ret = fn(
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
return self.__read(self.lib.libusb_bulk_transfer,
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 954, in __read
_check(retval)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 602, in _check
raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out`
[Errno 16]:
`Traceback (most recent call last):
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/gui.py", line 163, in print_label
self.print_server.print_label(self.label_bitmap, self.margin.value())
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/dymo_print_engines.py", line 491, in print_label
lm.printLabel(label_matrix, margin=margin)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 203, in printLabel
self.rawPrintLabel(lines, margin=margin)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 225, in rawPrintLabel
response = self.sendCommand()
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 71, in sendCommand
cmdBin.tofile(self.devout)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 408, in write
return self.device.write(self, data, timeout)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 986, in write
intf, ep = self._ctx.setup_request(self, endpoint)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 229, in setup_request
self.managed_claim_interface(device, intf)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 178, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 829, in claim_interface
_check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
File "/home/mypc/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy`
Looks like the battery is low in your printer. Keep it connected via USB for 30 minutes or more and then try again.
If you manage to print a few labels before the problem repeats itself, this may be a sign that your battery is worn out and need replacing.
Looks like the battery is low in your printer. Keep it connected via USB for 30 minutes or more and then try again. If you manage to print a few labels before the problem repeats itself, this may be a sign that your battery is worn out and need replacing.
Thank you for your suggestion! That was it! I would never would have guessed. I connected it to a wall charger and left it charging for about 4 hours and now I was able to print some labels without issues. I don't know how long the charge lasts, but at least now I can print.
Thank you again!
Thank you for reporting this @ossmart! This is useful data we could eventually use to suggest to the user that there might be a problem with their battery.
The printer should charge itself steadily if it is simply left connected to USB port at all times.
For prolonged storage, the battery must be physically removed from the device.
If you're annoyed by blue LED, just switch off the printer using its button.
The charge reporting may be added to dymoprint at some point, maybe when I'm done with my two jobs I have right now..
But if it is completely discharged, I don't know if we have any means of forcing the printer to report its status before error happens.