Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8015

Troubleshooting • Re: Zebra printer issues

$
0
0
I'm using https://pypi.org/project/zebra/ and https://pypi.org/project/zpl/. The code work perfectly on my windows machine.

I connected my Zebra ZD411 to my raspberry pi. Set it up using CUPS. It is able to print the test info from the cups web interface.

When I try to run the code, I get the following error:

Code:

FileNotFoundError: [Errno 2] No such file or directory: 'lpr'
I'm assuming that lpr is some file that is created and contains the information that is sent to the printer. It must be failing to be created? If anyone has some insight into what I'm doing wrong, please let me know.
I'm not sure about that. "lpr" is a common command used for printing (like "lp"). It's possible that you don't have that command installed on your Pi.

Looking at the Zebra python code it does use the lpr command

Code:

            p = subprocess.Popen(                ['lpr', '-P{}'.format(self.queue), '-oraw'], stdin=subprocess.PIPE
Try installing the cups-bsd package with apt. That should give you the lpr command.

Statistics: Posted by rpdom — Wed Mar 26, 2025 9:18 am



Viewing all articles
Browse latest Browse all 8015

Trending Articles