pklaus / brother_ql

Python package for the raster language protocol of the Brother QL series label printers (QL-500, QL-550, QL-560, QL-570, QL-700, QL-710W, QL-720NW, QL-800, QL-810W, QL-820NWB, QL-1050, QL-1060N and more).
GNU General Public License v3.0
558 stars 165 forks source link

No luck on Raspberry #103

Closed jaromrax closed 2 years ago

jaromrax commented 3 years ago

Hi, I have 32-bit system on RPi3B+ (the image works also on ZERO).

Linux rpi3bac2 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l GNU/Linux
Raspbian GNU/Linux 10

I have no luck. I resized the image, exported the name, but it always ends with

export BROTHER_QL_MODEL=QL-700                            
pi@rpi3bac2: ~/02_GIT/pyql700 master $ brother_ql print  -l  62x29  j.png                   
deprecation warning: brother_ql.devicedependent is deprecated and will be removed in a future release
INFO:brother_ql.backends.helpers:No backend stated. Selecting the default linux_kernel backend.
Traceback (most recent call last):
  File "/usr/local/bin/brother_ql", line 10, in <module>
    sys.exit(cli())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/brother_ql/cli.py", line 147, in print_cmd
    send(instructions=instructions, printer_identifier=printer, backend_identifier=backend, blocking=True)
  File "/usr/local/lib/python3.7/dist-packages/brother_ql/backends/helpers.py", line 57, in send
    printer = BrotherQLBackend(printer_identifier)
  File "/usr/local/lib/python3.7/dist-packages/brother_ql/backends/linux_kernel.py", line 49, in __init__
    raise NotImplementedError('Currently the printer can be specified either via an appropriate string or via an os.open() handle.')
NotImplementedError: Currently the printer can be specified either via an appropriate string or via an os.open() handle.

Thank you for the advice Jaro

Edit: maybe not possible on 32bit system?

meirg commented 3 years ago

You need to set the backend and printer identifier. Use -b linux_kernel for the backend and -p /dev/usb/lpX (should be lp0 if no other printers connected)

brother_ql -b linux_kernel -p /dev/usb/lp0 -l 62x29 print j.png

I've used successfully on many 32-bit Raspberry Pis

jaromrax commented 2 years ago

THANK YOU!